kbendick commented on a change in pull request #1227:
URL: https://github.com/apache/iceberg/pull/1227#discussion_r463297612
##########
File path: dev/source-release.sh
##########
@@ -66,7 +66,11 @@ tarball=$tag.tar.gz
# be conservative and use the release hash, even though git produces the same
# archive (identical hashes) using the scm tag
-git archive $release_hash --prefix $tag/ -o $tarball .baseline api arrow
bundled-guava common core data dev flink gradle gradlew hive mr orc parquet pig
spark spark2 spark-runtime spark3 spark3-runtime LICENSE NOTICE README.md
build.gradle baseline.gradle deploy.gradle tasks.gradle jmh.gradle
gradle.properties settings.gradle versions.lock versions.props version.txt
+adds=" .baseline" # prefixed with a blank space for each file name including
the first one
+excludes="build|examples|jitpack.yml|python|site"
+archives=$(ls | grep -vE ${excludes})${adds}
+echo git archive list: ${archives}
Review comment:
So perhaps I'm running this wrong, but my `$archives` comes out
formatted kind of funny based on my expectations. Everything is separated by a
newline character except for ` .baseline` which is separated by a space from
the last entry. I believe you're correct that `git-archive` excpects the output
of archive files / directories to be separated by spaces. Is it possible that
we need to munge the output of `$archives` to be space delimited instead of the
mixture of newline delimited and space delimited that I got? It's also possible
that I ran the script wrong.
Below is my $archives list after running this portion of the script using
`apache-iceberg-0.9.0` release (I couldn't find any releases tagged with as an
`rc` candidate though I didn't spend a ton of time looking as it likely
wouldn't have changed the output of this portion of the script.
```bash
$ echo ${archives}
LICENSE
NOTICE
README.md
api
arrow
baseline.gradle
bundled-guava
common
core
data
deploy.gradle
dev
flink
gradle
gradle.properties
gradlew
hive
jmh.gradle
mr
orc
parquet
pig
settings.gradle
spark
spark-runtime
spark2
spark3
spark3-runtime
tasks.gradle
versions.props .baseline
```
I would think at the very least we would need to add `\` to the end of every
line for the bash shell to understand the remaining lines are part of the same
statement.
##########
File path: dev/source-release.sh
##########
@@ -66,7 +66,11 @@ tarball=$tag.tar.gz
# be conservative and use the release hash, even though git produces the same
# archive (identical hashes) using the scm tag
-git archive $release_hash --prefix $tag/ -o $tarball .baseline api arrow
bundled-guava common core data dev flink gradle gradlew hive mr orc parquet pig
spark spark2 spark-runtime spark3 spark3-runtime LICENSE NOTICE README.md
build.gradle baseline.gradle deploy.gradle tasks.gradle jmh.gradle
gradle.properties settings.gradle versions.lock versions.props version.txt
+adds=" .baseline" # prefixed with a blank space for each file name including
the first one
+excludes="build|examples|jitpack.yml|python|site"
+archives=$(ls | grep -vE ${excludes})${adds}
+echo git archive list: ${archives}
Review comment:
If I add `archives=$(echo $archives | tr '\n' ' ')`, then my `$archives`
output is space delimited as I believe is the expected behavior for input to
`git archive`.
```bash
$ echo ${archives}
LICENSE
NOTICE
README.md
api
arrow
baseline.gradle
bundled-guava
common
core
data
deploy.gradle
dev
flink
gradle
gradle.properties
gradlew
hive
jmh.gradle
mr
orc
parquet
pig
settings.gradle
spark
spark-runtime
spark2
spark3
spark3-runtime
tasks.gradle
versions.props .baseline
$ archives=$(echo $archives | tr '\n' ' ')
$ echo $archives
LICENSE NOTICE README.md api arrow baseline.gradle bundled-guava common core
data deploy.gradle dev flink gradle gradle.properties gradlew hive jmh.gradle
mr orc parquet pig settings.gradle spark spark-runtime spark2 spark3
spark3-runtime tasks.gradle versions.props .baseline
```
##########
File path: dev/source-release.sh
##########
@@ -66,7 +66,11 @@ tarball=$tag.tar.gz
# be conservative and use the release hash, even though git produces the same
# archive (identical hashes) using the scm tag
-git archive $release_hash --prefix $tag/ -o $tarball .baseline api arrow
bundled-guava common core data dev flink gradle gradlew hive mr orc parquet pig
spark spark2 spark-runtime spark3 spark3-runtime LICENSE NOTICE README.md
build.gradle baseline.gradle deploy.gradle tasks.gradle jmh.gradle
gradle.properties settings.gradle versions.lock versions.props version.txt
+adds=" .baseline" # prefixed with a blank space for each file name including
the first one
+excludes="build|examples|jitpack.yml|python|site"
+archives=$(ls | grep -vE ${excludes})${adds}
+echo git archive list: ${archives}
Review comment:
Ahh I see. It's a good thing we checked on another shell then. It's
probably safer to normalize to ensure the script is more portable.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]