[ 
https://issues.apache.org/jira/browse/ARROW-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16395659#comment-16395659
 ] 

ASF GitHub Bot commented on ARROW-2293:
---------------------------------------

wesm closed pull request #1738: ARROW-2293: [JS] Print release vote e-mail 
template when making source release
URL: https://github.com/apache/arrow/pull/1738
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/dev/release/js-source-release.sh b/dev/release/js-source-release.sh
index 53b31af62f..292869db69 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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [JS] Print release vote e-mail template when making source release
> ------------------------------------------------------------------
>
>                 Key: ARROW-2293
>                 URL: https://issues.apache.org/jira/browse/ARROW-2293
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Wes McKinney
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: JS-0.3.1
>
>
> This would help with streamlining the source release process. See 
> https://github.com/apache/parquet-cpp/blob/master/dev/release/release-candidate
>  for an example



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to