You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2018/08/08 22:01:47 UTC

[mesos] 02/03: Use annotated tags in vote.sh and release.sh.

This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to annotated tag 1.4.2-rc1
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9a11d9c739dd98f2c89f01efd04c44d47dfa8105
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Thu Nov 16 15:45:43 2017 -0500

    Use annotated tags in vote.sh and release.sh.
    
    Review: https://reviews.apache.org/r/63889
---
 docs/release-guide.md |  5 ++---
 support/release.sh    |  2 +-
 support/vote.sh       | 16 +++++++++++++++-
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/docs/release-guide.md b/docs/release-guide.md
index d772bca..cc2f1c9 100644
--- a/docs/release-guide.md
+++ b/docs/release-guide.md
@@ -154,7 +154,7 @@ This guide describes the process of doing an official release of Mesos.
 
 3. First tag the required SHA locally.
 
-        $ git tag <X.Y.Z-rcR>
+        $ git tag -a <X.Y.Z-rcR> -m "Tagging Mesos <X.Y.X-rcR>."
 
    **NOTE:** `X.Y.Z` is based on [semantic versioning](http://semver.org/)
    scheme. `R` is release candidate version that starts with 1.
@@ -233,8 +233,7 @@ This guide describes the process of doing an official release of Mesos.
    in `site/data/releases.yml`. It is used to generate the release information
    on the website.
 
-2. Update the [Getting Started](getting-started.md) guide to use the latest
-   release link.
+2. Update the [Building](building.md) guide to use the latest release link.
 
 3. Check out the website from svn.
 
diff --git a/support/release.sh b/support/release.sh
index df62432..ced765b 100755
--- a/support/release.sh
+++ b/support/release.sh
@@ -58,7 +58,7 @@ popd # ${WORK_DIR}
 
 echo "${GREEN}Tagging ${TAG} as ${VERSION} ${NORMAL}"
 
-git tag ${VERSION} ${TAG}
+git tag -a ${VERSION} ${TAG} -m "Tagging Mesos ${VERSION}"
 
 echo "${GREEN}Pushing the git tag to the repository...${NORMAL}"
 
diff --git a/support/vote.sh b/support/vote.sh
index 75c6cee..4d3c39e 100755
--- a/support/vote.sh
+++ b/support/vote.sh
@@ -24,7 +24,21 @@ TAG="${VERSION}-rc${CANDIDATE}"
 echo "Checking for sha512sum or gsha512sum"
 SHA512SUM=$(command -v sha512sum || command -v gsha512sum)
 
-echo "${GREEN}Voting for mesos-${VERSION} candidate ${CANDIDATE}${NORMAL}"
+if ! git rev-parse "$TAG" > /dev/null 2>&1; then
+  echo "Tag $TAG doesn't exist. Please create one using:"
+  echo "  git tag -a $TAG -m \"Tagging Mesos $TAG.\""
+  exit 1
+fi
+
+if [ "$(git cat-file -t $TAG)" != "tag" ]; then
+  echo "Tag $TAG is not annotated. First delete the existing tag using:"
+  echo "  git tag -d $TAG"
+  echo "Then create an annotated tag using:"
+  echo "  git tag -a $TAG -m \"Tagging Mesos $TAG.\""
+  exit 1;
+fi
+
+echo "${GREEN}Tagging and Voting for mesos-${VERSION} candidate ${CANDIDATE}${NORMAL}"
 
 read -p "Hit enter to continue ... "