You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/05/30 07:56:52 UTC

[GitHub] sijie closed pull request #1451: Update release procedure to use candidate tags for voting

sijie closed pull request #1451: Update release procedure to use candidate tags for voting
URL: https://github.com/apache/bookkeeper/pull/1451
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/dev/release/000-run-docker.sh b/dev/release/000-run-docker.sh
index 5ec4c469c..255a6a210 100755
--- a/dev/release/000-run-docker.sh
+++ b/dev/release/000-run-docker.sh
@@ -71,6 +71,7 @@ DEVELOPMENT_VERSION="${NEXT_VERSION}-SNAPSHOT"
 
 TAG="release-${VERSION}"
 RC_DIR="bookkeeper-${VERSION}-rc${RC_NUM}"
+RC_TAG="v${VERSION}-rc${RC_NUM}"
 
 CMD="
 gpg-agent --daemon --pinentry-program /usr/bin/pinentry --homedir \$HOME/.gnupg --use-standard-socket
@@ -89,6 +90,7 @@ echo 'BRANCH_NAME               = $BRANCH_NAME'
 echo 'TAG                       = $TAG'
 echo 'RC_NUM                    = $RC_NUM'
 echo 'RC_DIR                    = $RC_DIR'
+echo 'RC_TAG                    = $RC_TAG'
 echo
 echo 'Before executing any release scripts, PLEASE configure your git to cache your github password:'
 echo
@@ -114,6 +116,7 @@ docker run -i -t \
   -e DEVELOPMENT_VERSION=${DEVELOPMENT_VERSION} \
   -e RC_NUM=${RC_NUM} \
   -e TAG=${TAG} \
+  -e RC_TAG=${RC_TAG} \
   -e RC_DIR=${RC_DIR} \
   ${IMAGE_NAME}-${USER_NAME} \
   bash -c "${CMD}"
diff --git a/dev/release/002-release-prepare.sh b/dev/release/002-release-prepare.sh
index ed684ad92..232fb502a 100755
--- a/dev/release/002-release-prepare.sh
+++ b/dev/release/002-release-prepare.sh
@@ -24,7 +24,7 @@ cd $BK_HOME
 
 mvn release:prepare \
     -DreleaseVersion=${VERSION} \
-    -Dtag=${TAG} \
+    -Dtag=${RC_TAG} \
     -DupdateWorkingCopyVersions=false \
     -Darguments="-Dmaven.javadoc.skip=true -DskipTests=true -Dstream" \
     -Dstream \
diff --git a/dev/release/005-cleanup-rc-tags.sh b/dev/release/005-cleanup-rc-tags.sh
new file mode 100755
index 000000000..ddb88404f
--- /dev/null
+++ b/dev/release/005-cleanup-rc-tags.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e -x -u
+
+BINDIR=`dirname "$0"`
+BK_HOME=`cd $BINDIR/../..;pwd`
+
+cd $BK_HOME
+
+for num in $(seq 0 $RC_NUM); do
+    git tag -d "v${VERSION}-rc${num}"
+    git push apache :"v${VERSION}-rc${num}"
+done
diff --git a/site/community/release_guide.md b/site/community/release_guide.md
index 794c03f1f..b8ae231c1 100644
--- a/site/community/release_guide.md
+++ b/site/community/release_guide.md
@@ -263,6 +263,7 @@ Set up a few environment variables to simplify Maven commands that follow. This
     RC_NUM="0"
     TAG="release-${VERSION}"
     RC_DIR="bookkeeper-${VERSION}-rc${RC_NUM}"
+    RC_TAG="v${VERSION}-rc${RC_NUM}"
 
 > Please make sure `gpg` command is in your $PATH. The maven release plugin use `gpg` to sign generated jars and packages.
 
@@ -445,6 +446,24 @@ Copy the source release from the `dev` repository to the `release` repository at
 
     svn move https://dist.apache.org/repos/dist/dev/bookkeeper/bookkeeper-${VERSION}-rc${RC_NUM} https://dist.apache.org/repos/dist/release/bookkeeper/bookkeeper-${VERSION}
 
+### Git tag
+
+Create and push a new signed for the released version by copying the tag for the final release tag, as follows
+
+```shell
+git tag -s "${TAG}" "${RC_TAG}"
+git push apache "${TAG}"
+```
+
+Remove rc tags:
+
+```shell
+for num in $(seq 0 ${RC_NUM}); do
+    git tag -d "v${VERSION}-rc${num}"
+    git push apache :"v${VERSION}-rc${num}"
+done
+```
+
 ### Update Website
 
 1. Create the documentation for `${VERSION}`. Run the `release.sh` to generate the branch for `${VERSION}` and bump


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services