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

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 317b543  ARROW-2293: [JS] Print release vote e-mail template when 
making source release
317b543 is described below

commit 317b54318f468a7af1f7b08d57826ef5a3e7a151
Author: Brian Hulette <brian.hule...@ccri.com>
AuthorDate: Mon Mar 12 14:22:19 2018 -0400

    ARROW-2293: [JS] Print release vote e-mail template when making source 
release
    
    Author: Brian Hulette <brian.hule...@ccri.com>
    
    Closes #1738 from TheNeuralBit/js-email-template and squashes the following 
commits:
    
    3c0fc205 <Brian Hulette> Default to 72 hour vote window
    6ce42160 <Brian Hulette> Add email template to JS release script
---
 dev/release/js-source-release.sh | 118 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 109 insertions(+), 9 deletions(-)

diff --git a/dev/release/js-source-release.sh b/dev/release/js-source-release.sh
index 53b31af..292869d 100755
--- a/dev/release/js-source-release.sh
+++ b/dev/release/js-source-release.sh
@@ -21,9 +21,38 @@ set -e
 
 SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
+function print_help_and_exit {
+cat <<EOF
+Apache Arrow JS release candidate tool.
+
+Usage: $0 [-h] [-p] <js-version> <rc-num>"
+
+  -h  Print this help message and exit
+  -p  If present, publish the release candidate (default: does not publish 
anything)
+EOF
+exit 0
+}
+
+publish=0
+while getopts ":hp" opt; do
+  case $opt in
+    p)
+      publish=1
+      ;;
+    h)
+      print_help_and_exit
+      ;;
+    *  )
+      echo "Unknown option: -$OPTARG"
+      print_help_and_exit
+      ;;
+  esac
+done
+
+shift $(($OPTIND - 1))
+
 if [ "$#" -ne 2 ]; then
-  echo "Usage: $0 <js-version> <rc-num>"
-  exit
+  print_help_and_exit
 fi
 
 js_version=$1
@@ -32,6 +61,17 @@ rc=$2
 tag=apache-arrow-js-${js_version}
 tagrc=${tag}-rc${rc}
 
+# Reset instructions
+current_git_rev=$(git rev-parse HEAD)
+function print_reset_instructions {
+cat <<EOF
+To roll back your local repo you will need to run:
+
+  git reset --hard ${current_git_rev}
+  git tag -d ${tag}
+EOF
+}
+
 echo "Preparing source for tag ${tag}"
 
 tarball=${tag}.tar.gz
@@ -82,14 +122,16 @@ sha1sum $tarball > ${tarball}.sha1
 sha256sum $tarball > ${tarball}.sha256
 sha512sum $tarball > ${tarball}.sha512
 
-# check out the arrow RC folder
-svn co --depth=empty https://dist.apache.org/repos/dist/dev/arrow js-rc-tmp
+if [[ $publish == 1 ]]; then
+  # check out the arrow RC folder
+  svn co --depth=empty https://dist.apache.org/repos/dist/dev/arrow js-rc-tmp
 
-# add the release candidate for the tag
-mkdir -p js-rc-tmp/${tagrc}
-cp ${tarball}* js-rc-tmp/${tagrc}
-svn add js-rc-tmp/${tagrc}
-svn ci -m 'Apache Arrow JavaScript ${version} RC${rc}' js-rc-tmp/${tagrc}
+  # add the release candidate for the tag
+  mkdir -p js-rc-tmp/${tagrc}
+  cp ${tarball}* js-rc-tmp/${tagrc}
+  svn add js-rc-tmp/${tagrc}
+  svn ci -m 'Apache Arrow JavaScript ${version} RC${rc}' js-rc-tmp/${tagrc}
+fi
 
 cd -
 
@@ -100,3 +142,61 @@ echo "Success! The release candidate is available here:"
 echo "  https://dist.apache.org/repos/dist/dev/arrow/${tagrc}";
 echo ""
 echo "Commit SHA1: ${release_hash}"
+echo ""
+echo "The following draft email has been created to send to the "
+echo "d...@arrow.apache.org mailing list"
+echo ""
+
+# Create the email template for the release candidate to be sent to the 
mailing lists.
+MESSAGE=$(cat <<__EOF__
+To: d...@arrow.apache.org
+Subject: [VOTE] Release Apache Arrow JS ${js_version} - RC${rc}
+
+Hello all,
+
+I\'d like to propose the following release candidate (rc${rc}) of Apache Arrow
+JavaScript version ${js_version}.
+
+The source release rc{$rc} is hosted at [1].
+
+This release candidate is based on commit
+${release_hash}
+
+Please download, verify checksums and signatures, run the unit tests, and vote
+on the release. The easiest way is to use the JavaScript-specific release
+verification script dev/release/js-verify-release-candidate.sh.
+
+The vote will be open for at least 72 hours and will close once
+enough PMCs have approved the release.
+
+[ ] +1 Release this as Apache Arrow JavaScript ${js_version}
+[ ] +0
+[ ] -1 Do not release this as Apache Arrow JavaScript ${js_version} because...
+
+
+How to validate a release signature:
+https://httpd.apache.org/dev/verification.html
+
+[1]: https://dist.apache.org/repos/dist/dev/arrow/${tagrc}/
+[2]: https://github.com/apache/arrow/tree/${release_hash}
+
+__EOF__
+)
+
+
+echo 
"--------------------------------------------------------------------------------"
+echo
+echo "${MESSAGE}"
+echo
+echo 
"--------------------------------------------------------------------------------"
+echo
+
+
+# Print reset instructions if this was a dry-run
+if [[ $publish == 0 ]]; then
+  echo
+  echo "This was a dry run, nothing has been published."
+  echo "To publish, re-run this script with the -p flag."
+  echo
+  print_reset_instructions
+fi

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.

Reply via email to