kbendick commented on a change in pull request #1227:
URL: https://github.com/apache/iceberg/pull/1227#discussion_r487610701



##########
File path: dev/source-release.sh
##########
@@ -66,7 +66,12 @@ 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"  # excluded as they are not 
of use for releasing jars
+echo "Excluded files and directories: ${excludes}"
+archives=$(git ls-tree --name-only -r HEAD | cut -d"/" -f1 | uniq | grep -vE 
${excludes} | tr '\n' ' ')${adds}
+echo "Included files and directories: ${archives}"
+git archive $release_hash --prefix $tag/ -o $tarball ${archives}

Review comment:
       When I run it as is on my local, I get a fatalpathspec. However, when I 
substitute the variable of `$archives` with `$(git ls-tree --name-only -r HEAD 
| cut -d"/" -f1 | uniq | grep -vE ${excludes} | tr '\n' ' ')` directly, the 
tarball is correctly generated.
   
   ```
   $ git archive $release_hash --prefix $tag/ -o $tarball ${archives}
   fatal: pathspec '.asf.yaml .baseline .github .gitignore .travis.yml LICENSE 
NOTICE README.md api arrow baseline.gradle bundled-guava common core data 
deploy.gradle dev flink gradle.properties gradle gradlew hive-metastore 
hive-runtime jmh.gradle mr orc parquet pig settings.gradle spark-runtime spark 
spark2 spark3-runtime spark3 tasks.gradle version.txt versions.props ' did not 
match any files
   ```




----------------------------------------------------------------
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]

Reply via email to