vinishjail97 commented on code in PR #1008:
URL: https://github.com/apache/incubator-xtable/pull/1008#discussion_r4533879550


##########
release/release_guide.md:
##########
@@ -168,7 +168,7 @@ The core of the release process is the build-vote-fix 
cycle. Each cycle produces
 
 Set up a few environment variables to simplify Maven commands that follow. 
This identifies the release candidate being built. Start with RC_NUM equal to 1 
and increment it for each candidate.
 
-1. Generate Source Release: This will create the tarball under 
incubator-xtable/src_release directory
+1. Generate Source Release: This will create the tarball under 
incubator-xtable/src_release directory with `git archive` of the tag, so create 
and push the tag (step 2) first

Review Comment:
   Nit, optional: since this step now needs the tag from step 2, would it read 
more clearly to swap the two steps instead of adding the note?



##########
release/scripts/create_source_release.sh:
##########
@@ -46,30 +46,23 @@ cd ..
 
 XTABLE_DIR=`pwd`
 RELEASE_DIR=${XTABLE_DIR}/src_release
-CLONE_DIR=${RELEASE_DIR}/incubator-xtable-tmp-clone
[email protected]:apache/incubator-xtable.git
+GITHUB_REPO_URL=https://github.com/apache/incubator-xtable.git
+RELEASE_TAG=release-${RELEASE_VERSION}-rc${RC_NUM}
 
 echo "Creating source package"
 
 rm -rf ${RELEASE_DIR}
 mkdir -p ${RELEASE_DIR}
 
-# create a temporary git clone to ensure that we have a pristine source release
-git clone ${GITHUB_REPO_URL} ${CLONE_DIR}
-cd ${CLONE_DIR}
-git checkout release-${RELEASE_VERSION}-rc${RC_NUM}
+# Fails if the local tag differs from the pushed one, which voters check 
against
+git fetch ${GITHUB_REPO_URL} tag ${RELEASE_TAG}
 
-rsync -a \
-  --exclude ".git" --exclude ".gitignore" --exclude ".gitattributes" --exclude 
".travis.yml" \
-  --exclude ".github" --exclude "target" --exclude ".idea" --exclude "*.iml" 
--exclude ".DS_Store" \
-  --exclude "build-target" --exclude ".rubydeps" --exclude "rfc" --exclude 
"docker/images" \
-  --exclude "assets" --exclude "demo" --exclude "website" --exclude 
"style/IDE.png" \
-  --exclude "xtable-service/examples" . apache-xtable-$RELEASE_VERSION
-
-tar czf ${RELEASE_DIR}/apache-xtable-${RELEASE_VERSION}.src.tgz 
apache-xtable-$RELEASE_VERSION
+# Only committed files minus export-ignore paths in .gitattributes, owned by 
0/0 with
+# the commit's mtime, so the archive does not depend on the machine that 
builds it
+git -c tar.umask=0022 archive --format=tar 
--prefix=apache-xtable-${RELEASE_VERSION}/ ${RELEASE_TAG} \

Review Comment:
   Nit, optional: `tar.umask=0022` is already git's default, so the `-c` could 
go, though I am fine keeping it as explicit intent.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to