You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by jo...@apache.org on 2014/01/16 20:56:46 UTC

git commit: Sign tags using the GPG key associated with the configured git email address; fix rollback instructions and move tag-release script to new "release" subdir

Updated Branches:
  refs/heads/master 25fab7f2c -> b493027e7


Sign tags using the GPG key associated with the configured git email address; fix
rollback instructions and move tag-release script to new "release" subdir

Reviewed at https://reviews.apache.org/r/16941/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/b493027e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/b493027e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/b493027e

Branch: refs/heads/master
Commit: b493027e77403b2db5ac4af0b00af27369726502
Parents: 25fab7f
Author: Jonathan Boulle <jo...@twitter.com>
Authored: Thu Jan 16 11:54:56 2014 -0800
Committer: Jonathan Boulle <jo...@twitter.com>
Committed: Thu Jan 16 11:54:56 2014 -0800

----------------------------------------------------------------------
 build-support/release/tag-release | 83 ++++++++++++++++++++++++++++++++++
 build-support/tag-release         | 81 ---------------------------------
 2 files changed, 83 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b493027e/build-support/release/tag-release
----------------------------------------------------------------------
diff --git a/build-support/release/tag-release b/build-support/release/tag-release
new file mode 100755
index 0000000..90dc5da
--- /dev/null
+++ b/build-support/release/tag-release
@@ -0,0 +1,83 @@
+#!/bin/bash
+# Cuts a release tag (non -snapshot) from the current master and prints instructions for publishing
+# it. The generated tag object is PGP-signed. Given a current master on 0.3.0-snapshot it will
+# create a git history that looks like this:
+# master~1 (0.3.0-snapshot) ----- master (0.4.0-snapshot)
+#                            \--- release-0.4.0 (0.4.0) tag: 0.4.0 (0.4.0)
+set -o errexit
+set -o nounset
+
+if [[ -n "`git status --porcelain`" ]]; then
+  echo "!! Please run from a clean master."
+  exit 1
+elif [[ "`git rev-parse --abbrev-ref HEAD`" != master ]]; then
+  echo "!! This script must be run from master."
+  exit 1
+elif [[ "`git rev-parse --show-toplevel`" != "$PWD" ]]; then
+  echo "!! This script must be run from the root of the repository."
+  exit 1
+fi
+
+echo == Updating to latest master.
+git pull
+git fetch --tags
+
+current_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
+if ! [[ $current_version =~ .*-SNAPSHOT ]]; then
+  echo "!! This is not a SNAPSHOT branch (.auroraversion is $current_version)."
+  exit 1
+else
+  major=`echo $current_version | cut -d. -f1`
+  minor=`echo $current_version | cut -d. -f2`
+  patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`
+  new_tagged_version="$major.$minor.$patch"
+  new_snapshot_version="$major.$((minor + 1)).$patch-SNAPSHOT"
+  release_branch_name="release-$major.$minor.x"
+fi
+
+if git rev-parse $new_tagged_version >/dev/null 2>&1; then
+  echo "Tag $new_tagged_version already exists, aborting."
+  exit 1
+fi
+
+current_rev=`git rev-parse HEAD`
+function print_rollback_instructions {
+cat <<EOF
+!! Looks like something failed. That's okay, the world doesn't need to know.
+
+To roll back your local repo you might need to run:
+  git checkout master
+  git reset --hard $current_rev
+  git tag -d $new_tagged_version
+  git branch -D $release_branch_name
+EOF
+}
+trap print_rollback_instructions EXIT
+
+echo == Incrementing snapshot version on master.
+echo $new_snapshot_version > .auroraversion
+git add .auroraversion
+git commit -m "Incrementing snapshot version from $current_version to $new_snapshot_version."
+
+echo == Creating $release_branch_name branch.
+git checkout -b $release_branch_name $current_rev
+
+echo == Committing updated .auroraversion.
+echo $new_tagged_version > .auroraversion
+git add .auroraversion
+git commit -m "aurora-$new_tagged_version release."
+
+echo == Creating tag $new_tagged_version.
+git tag -u `git config user.email` -s -m "aurora-$new_tagged_version release." $new_tagged_version
+
+
+cat <<EOF
+== Tag created.
+
+After you've verified that everything looks good, publish the new tag by running:
+  git push origin master
+  git push $new_tagged_version master
+EOF
+trap '' EXIT # Unset error message handler.
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b493027e/build-support/tag-release
----------------------------------------------------------------------
diff --git a/build-support/tag-release b/build-support/tag-release
deleted file mode 100755
index 6940d5d..0000000
--- a/build-support/tag-release
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-# Cuts a release tag (non -snapshot) from the current master and prints instructions for publishing
-# it. The generated tag object is PGP-signed. Given a current master on 0.3.0-snapshot it will
-# create a git history that looks like this:
-# master~1 (0.3.0-snapshot) ----- master (0.4.0-snapshot)
-#                            \--- release-0.4.0 (0.4.0) tag: 0.4.0 (0.4.0)
-set -o errexit
-set -o nounset
-
-if [[ -n "`git status --porcelain`" ]]; then
-  echo "!! Please run from a clean master."
-  exit 1
-elif [[ "`git rev-parse --abbrev-ref HEAD`" != master ]]; then
-  echo "!! This script must be run from master."
-  exit 1
-elif [[ "`git rev-parse --show-toplevel`" != "$PWD" ]]; then
-  echo "!! This script must be run from the root of the repository."
-  exit 1
-fi
-
-echo == Updating to latest master.
-git pull
-git fetch --tags
-
-current_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
-if ! [[ $current_version =~ .*-SNAPSHOT ]]; then
-  echo "!! This is not a SNAPSHOT branch (.auroraversion is $current_version)."
-  exit 1
-else
-  major=`echo $current_version | cut -d. -f1`
-  minor=`echo $current_version | cut -d. -f2`
-  patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`
-  new_tagged_version="$major.$minor.$patch"
-  new_snapshot_version="$major.$((minor + 1)).$patch-SNAPSHOT"
-  release_branch_name="release-$major.$minor.x"
-fi
-
-if git rev-parse $new_tagged_version >/dev/null 2>&1; then
-  echo "Tag $new_tagged_version already exists, aborting."
-  exit 1
-fi
-
-current_rev=`git rev-parse HEAD`
-function print_rollback_instructions {
-cat <<EOF
-!! Looks like something failed. That's okay, the world doesn't need to know.
-
-To roll back your local repo you might need to run:
-  git reset --hard master $current_rev
-  git tag -d $new_tagged_version
-  git branch -D $release_branch_name
-EOF
-}
-trap print_rollback_instructions EXIT
-
-echo == Incrementing snapshot version on master.
-echo $new_snapshot_version > .auroraversion
-git add .auroraversion
-git commit -m "Incrementing snapshot version from $current_version to $new_snapshot_version."
-
-echo == Creating $release_branch_name branch.
-git checkout -b $release_branch_name $current_rev
-
-echo == Committing updated .auroraversion.
-echo $new_tagged_version > .auroraversion
-git add .auroraversion
-git commit -m "aurora-$new_tagged_version release."
-
-echo == Creating tag $new_tagged_version.
-git tag -s -m "aurora-$new_tagged_version release." $new_tagged_version
-
-cat <<EOF
-== Tag created.
-
-After you've verified that everything looks good, publish the new tag by running:
-  git push origin master
-  git push $new_tagged_version master
-EOF
-trap '' EXIT # Unset error message handler.
-
-exit 0