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



##########
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:
       @kbendick Really sorry for my late response~~ Thanks for pointing that 
out. I never noticed that.
   But it seems a happy accident that it has the expected output...
   I made the following experiments just now:
   1. `echo ${archives}` directly (not in a shell script) -> the output is new 
line delimited.
   2. `echo "${archives}"` directly (not in a shell script) -> the output is 
new line delimited. 
   3. `echo ${archives}` in a shell sript -> the output is **space** delimited  
 <-- my lucky
   4. `echo "${archives}"` in a shell sript -> the output is new line delimited
   
   Yes, it is more safe to normalize the input to be all space delimited




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