You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2013/05/24 21:32:24 UTC

[5/6] git commit: *** Modified for 0.11.0 *** Added a support script for doing releases.

*** Modified for 0.11.0 *** Added a support script for doing releases.


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

Branch: refs/heads/0.11.x
Commit: d0356b190d461fa7e8e993dd854f71c6f84d008f
Parents: 723570e
Author: Vinod Kone <vi...@twitter.com>
Authored: Fri May 24 10:25:54 2013 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Fri May 24 10:25:54 2013 -0700

----------------------------------------------------------------------
 support/release.sh |   67 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/d0356b19/support/release.sh
----------------------------------------------------------------------
diff --git a/support/release.sh b/support/release.sh
new file mode 100755
index 0000000..0e1eec7
--- /dev/null
+++ b/support/release.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+# Use colors for errors.
+. $(dirname ${0})/colors.sh
+
+test ${#} -eq 2 || \
+  { echo "Usage: `basename ${0}` [version] [candidate]"; exit 1; }
+
+# TODO(benh): Figure out a way to get version number and release
+# candidate automagically.
+VERSION=${1}
+CANDIDATE=${2}
+
+echo "${GREEN}Releasing mesos-${VERSION} candidate ${CANDIDATE}${NORMAL}"
+
+read -p "Hit enter to continue ... "
+
+make distcheck || \
+  { echo "${RED}Failed to check the distribution${NORMAL}"; exit 1; }
+
+mv mesos-${VERSION}.tar.gz mesos-${VERSION}-incubating.tar.gz || \
+  { echo "${RED}Failed to rename the distribution${NORMAL}"; exit 1; }
+
+TARBALL=mesos-${VERSION}-incubating.tar.gz
+
+echo "${GREEN}Now let's sign the distribution ...${NORMAL}"
+
+# Sign the tarball.
+gpg --armor --output ${TARBALL}.asc --detach-sig ${TARBALL} || \
+  { echo "${RED}Failed to sign the distribution${NORMAL}"; exit 1; }
+
+echo "${GREEN}And let's create an MD5 ...${NORMAL}"
+
+# Create MD5 checksum.
+gpg --print-md MD5 ${TARBALL} > ${TARBALL}.md5 || \
+  { echo "${RED}Failed to create MD5 for distribution${NORMAL}"; exit 1; }
+
+DIRECTORY=public_html/mesos-${VERSION}-incubating-RC${CANDIDATE}
+
+echo "${GREEN}Now let's upload our artifacts (the distribution," \
+  "signature, and MD5) ...${NORMAL}"
+
+ssh people.apache.org "mkdir -p ${DIRECTORY}" || \
+  { echo "${RED}Failed to create remote directory${NORMAL}"; exit 1; }
+
+{ scp ${TARBALL} people.apache.org:${DIRECTORY}/ && \
+  scp ${TARBALL}.asc people.apache.org:${DIRECTORY}/ && \
+  scp ${TARBALL}.md5 people.apache.org:${DIRECTORY}/; } || \
+  { echo "${RED}Failed to copy distribution artifacts${NORMAL}"; exit 1; }
+
+echo "${GREEN}Now let's make the artifacts world readable ...${NORMAL}"
+
+{ ssh people.apache.org "chmod a+r ${DIRECTORY}/${TARBALL}" && \
+  ssh people.apache.org "chmod a+r ${DIRECTORY}/${TARBALL}.asc" && \
+  ssh people.apache.org "chmod a+r ${DIRECTORY}/${TARBALL}.md5"; } || \
+  { echo "${RED}Failed to change permissions of artifacts${NORMAL}";
+    exit 1; }
+
+echo "${GREEN}Finally, we'll create an SVN tag/branch ...${NORMAL}"
+
+MESSAGE="Tag for release-${VERSION}-incubating-RC${CANDIDATE}."
+
+git svn branch --tag -m ${MESSAGE} \
+  release-${VERSION}-incubating-RC${CANDIDATE} || \
+  { echo "${RED}Failed to create SVN tag/branch${NORMAL}"; exit 1; }
+
+exit 0