You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/11/10 18:02:20 UTC

[GitHub] [beam] ibzib commented on a change in pull request #13290: [BEAM-11074] build_release_candidate usability improvements.

ibzib commented on a change in pull request #13290:
URL: https://github.com/apache/beam/pull/13290#discussion_r520760990



##########
File path: release/src/main/scripts/build_release_candidate.sh
##########
@@ -116,13 +116,21 @@ if [[ $confirmation = "y" ]]; then
   echo "-------------Building Java Artifacts with Gradle-------------"
   git config credential.helper store
 
-  ./gradlew release -Prelease.newVersion=${RELEASE}-SNAPSHOT \
-                -Prelease.releaseVersion=${RELEASE}-RC${RC_NUM} \
-                -Prelease.useAutomaticVersion=true --info --no-daemon
-
-  git push origin "${RELEASE_BRANCH}"
-  git push origin "v${RELEASE}-RC${RC_NUM}"
-
+  if git rev-parse "v${RELEASE}-RC${RC_NUM}" >/dev/null 2>&1; then
+    echo "Tag v${RELEASE}-RC${RC_NUM} already exists."
+    echo "Delete the tag and create a new tag commit (y) or skip this step (n)? [y/N]"
+    read confirmation
+    if [[ $confirmation = "y" ]]; then
+      git push origin :refs/tags/v${RELEASE}-RC${RC_NUM}
+    fi
+  fi
+  if [[ $confirmation = "y" ]]; then # Expected to only be "n" if user chose to skip creating tag.

Review comment:
       ```suggestion
     if [[ $confirmation = "y" ]]; then # Expected to be "y" unless user chose to skip creating tag.
   ```

##########
File path: release/src/main/scripts/build_release_candidate.sh
##########
@@ -116,13 +116,21 @@ if [[ $confirmation = "y" ]]; then
   echo "-------------Building Java Artifacts with Gradle-------------"
   git config credential.helper store
 
-  ./gradlew release -Prelease.newVersion=${RELEASE}-SNAPSHOT \
-                -Prelease.releaseVersion=${RELEASE}-RC${RC_NUM} \
-                -Prelease.useAutomaticVersion=true --info --no-daemon
-
-  git push origin "${RELEASE_BRANCH}"
-  git push origin "v${RELEASE}-RC${RC_NUM}"
-
+  if git rev-parse "v${RELEASE}-RC${RC_NUM}" >/dev/null 2>&1; then
+    echo "Tag v${RELEASE}-RC${RC_NUM} already exists."
+    echo "Delete the tag and create a new tag commit (y) or skip this step (n)? [y/N]"
+    read confirmation
+    if [[ $confirmation = "y" ]]; then
+      git push origin :refs/tags/v${RELEASE}-RC${RC_NUM}

Review comment:
       Can you add a comment explaining how this deletes the tag?




----------------------------------------------------------------
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:
users@infra.apache.org