Return-Path: X-Original-To: apmail-aurora-commits-archive@minotaur.apache.org Delivered-To: apmail-aurora-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 157AE118F8 for ; Mon, 22 Sep 2014 18:23:18 +0000 (UTC) Received: (qmail 66696 invoked by uid 500); 22 Sep 2014 18:23:18 -0000 Delivered-To: apmail-aurora-commits-archive@aurora.apache.org Received: (qmail 66664 invoked by uid 500); 22 Sep 2014 18:23:18 -0000 Mailing-List: contact commits-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.incubator.apache.org Delivered-To: mailing list commits@aurora.incubator.apache.org Received: (qmail 66655 invoked by uid 99); 22 Sep 2014 18:23:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 18:23:17 +0000 X-ASF-Spam-Status: No, hits=-2000.8 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 22 Sep 2014 18:23:16 +0000 Received: (qmail 65536 invoked by uid 99); 22 Sep 2014 18:22:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 18:22:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EB1449D1776; Mon, 22 Sep 2014 18:22:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jfarrell@apache.org To: commits@aurora.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: AURORA-607:release script is broken Date: Mon, 22 Sep 2014 18:22:55 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-aurora Updated Branches: refs/heads/master 741f9dba5 -> 20fd9987f AURORA-607:release script is broken Updates release script to promote a voted on rc to an official release. Testing Done: ./build-support/release/release -r 2 I have not tested the actual promotion of the rc to release, as this is the first official ASF release of Apache Aurora I saved that for Kevin to do Steps to publish the 0.5.0 release with this script: * git checkout 0.5.0-rc2 * apply this patch * comment out dirty tree exit condition, line 89 of ./build-support/release/release * test with: ./build-support/release/release -r 2 * rm -rf dist * publish with: ./build-support/release/release -r 2 -p Bugs closed: aurora-607 Reviewed at https://reviews.apache.org/r/24173/ Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/20fd9987 Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/20fd9987 Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/20fd9987 Branch: refs/heads/master Commit: 20fd9987f0076277ed6c97a0da2050d9c6d0aa61 Parents: 741f9db Author: Jake Farrell Authored: Mon Sep 22 14:22:48 2014 -0400 Committer: jfarrell Committed: Mon Sep 22 14:22:48 2014 -0400 ---------------------------------------------------------------------- build-support/release/release | 76 ++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 27 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/20fd9987/build-support/release/release ---------------------------------------------------------------------- diff --git a/build-support/release/release b/build-support/release/release index d94f3ba..a72c308 100755 --- a/build-support/release/release +++ b/build-support/release/release @@ -76,7 +76,7 @@ To configure one, find your code signing key's ID with Then configure it as the signing key for this repository with - git config user.signingkey YOUR_KEY_ID + git config --global user.signingkey YOUR_KEY_ID EOF exit 1 fi @@ -99,13 +99,22 @@ fi # Make sure that this is not on a snapshot release current_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]') -if ! [[ $current_version =~ .*-SNAPSHOT ]]; then +if [[ $current_version =~ .*-SNAPSHOT ]]; then echo "ERROR: .auroraversion can not be a 'SNAPSHOT', it 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` + + current_version="${major}.${minor}.${patch}" fi +previous_version_tag="${current_version}-rc${rc_tag_version}" +current_version_tag="${current_version}-incubating" + # Make sure the tag does not exist -if git rev-parse --tags=$current_version >/dev/null 2>&1; then +if [[ $(git ls-remote --exit-code --tags origin refs/tags/${current_version} >/dev/null 2>&1) == 0 ]]; then echo "ERROR: ${current_version} tag exists." exit 1 fi @@ -115,54 +124,67 @@ if [[ $publish == 0 ]]; then echo "Performing dry-run" fi +dist_name="apache-aurora-${current_version_tag}" + if [[ $publish == 1 ]]; then - echo "Creating release tag ${current_version}." # Create release branch and tag and push them to the origin - git checkout -b $current_version - git push origin $current_version - git tag -s "${current_version}" -m "aurora-${current_version} release." $current_version - git push origin --tags + echo "Creating ${current_version_tag} branch" + git checkout -b ${current_version_tag} + + # Increment the version and create a branch + echo ${current_version_tag} > .auroraversion + git add .auroraversion + git commit -m "Updating .auroraversion to release version ${current_version_tag}." + git push origin "${current_version_tag}" + git tag -s "${current_version_tag}" -m "Apache Aurora ${current_version_tag} release" ${current_version_tag} + git push origin "${current_version_tag}" fi -dist_name="aurora-${current_version}" - dist_dir=${base_dir}/dist rc_dir=${dist_dir}/rc +release_dir=${dist_dir}/${current_version} mkdir -p ${rc_dir} cd ${dist_dir} # Checkout the release candidate -svn co ${aurora_svn_dev_dist_url}/${current_version} ${rc_dir} +svn co ${aurora_svn_dev_dist_url}/${previous_version_tag} ${rc_dir} >/dev/null 2>&1 if [[ $publish == 1 ]]; then echo "Publishing the release" # Make the release dist directory and check it out svn mkdir ${aurora_svn_dist_url}/${current_version} -m "aurora-${current_version} release" - svn co --depth=empty ${aurora_svn_dist_url}/${current_version} ${current_version} -else - mkdir ${current_version} + svn co --depth=empty ${aurora_svn_dist_url}/${current_version} ${release_dir} else + mkdir ${release_dir} +fi + +cd ${release_dir} + +# Rename the .auroraversion from -RC[:digit:] to release current_version_tag and repackage the release +tar -xzf ${rc_dir}/apache-aurora-*.tar.gz +mv apache-aurora-* ${dist_name} +echo ${current_version_tag} > ${dist_name}/.auroraversion +tar -czf ${dist_name}.tar.gz ${dist_name} +rm -rf ${dist_name} -# Remove the release candidate -rc# from the release package names -cd ${rc_dir} -for f in *; do cp "$f" "${dist_dir}/{current_version}/${f/-rc[[:digit:]]/}"; done -cd ${dist_dir}/{current_version} +# Sign the tarball. +echo "Signing the distribution" +gpg --armor --output ${dist_name}.tar.gz.asc --detach-sig ${dist_name}.tar.gz + +# Create the checksums +echo "Creating checksums" +gpg --print-md MD5 ${dist_name}.tar.gz > ${dist_name}.tar.gz.md5 +shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha if [[ $publish == 1 ]]; then # Commit the release - svn add aurora-* + svn add ${dist_name}* svn ci -m "aurora-${current_version} release" - - # Finally delete all release candidate branches - for ref in $(git for-each-ref --format='%(refname:short)' 'refs/heads/${current_version}-rc*') do - git branch -D ${ref} - git push origin --delete ${ref} - svn rm ${aurora_svn_dev_dist_url}/${ref} - done fi cd ${base_dir} +echo echo "Done creating the release. The following draft email has been created" echo "to send to the dev@aurora.incubator.apache.org mailing list." echo @@ -170,7 +192,7 @@ echo # Create the email template for the release to be sent to the mailing lists. MESSAGE=$(cat <<__EOF__ To: dev@aurora.incubator.apache.org -Subject: [RESULT][VOTE] Release Apache Aurora ${current_version} (incubating) RC#{rc_tag_version} +Subject: [RESULT][VOTE] Release Apache Aurora ${current_version} (incubating) RC${rc_tag_version} All, The vote to accept Apache Aurora ${current_version} RC#{rc_tag_version}