Skip to content

Apache DataFusion SQL Query Engine

ARROW-5018: [Release] Include JavaScript implementation

Kouhei Sutouaef72f63e4e1
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index c77207198a..6d117b179c 100755
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -64,14 +64,13 @@ update_versions() {
git add Directory.Build.props
cd -
- # We can enable this when Arrow JS uses the same version.
- # cd "${SOURCE_DIR}/../../js"
- # sed -i.bak -E -e \
- # "s/^ \"version\": \".+\"/ \"version\": \"${version}\"/" \
- # package.json
- # rm -f package.json
- # git add package.json
- # cd -
+ cd "${SOURCE_DIR}/../../js"
+ sed -i.bak -E -e \
+ "s/^ \"version\": \".+\"/ \"version\": \"${version}\"/" \
+ package.json
+ rm -f package.json.bak
+ git add package.json
+ cd -
cd "${SOURCE_DIR}/../../matlab"
sed -i.bak -E -e \
diff --git a/dev/release/02-source.sh b/dev/release/02-source.sh
index a784cda1ac..71a28cefc6 100755
--- a/dev/release/02-source.sh
+++ b/dev/release/02-source.sh
@@ -101,7 +101,53 @@ svn ci -m "Apache Arrow ${version} RC${rc}" tmp/${tagrc}
# clean up
rm -rf tmp
+rc_url="https://dist.apache.org/repos/dist/dev/arrow/${tagrc}"
echo "Success! The release candidate is available here:"
-echo " https://dist.apache.org/repos/dist/dev/arrow/${tagrc}"
+echo " ${rc_url}"
echo ""
echo "Commit SHA1: ${release_hash}"
+echo ""
+echo "The following draft email has been created to send to the"
+echo "[email protected] mailing list"
+echo ""
+echo "---------------------------------------------------------"
+jira_url="https://issues.apache.org/jira"
+jql="project%20%3D%20ARROW%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND%20fixVersion%20%3D%20${version}"
+n_resolved_issues=$(curl "${jira_url}/rest/api/2/search/?jql=${jql}" | jq ".total")
+cat <<MAIL
+Subject: [VOTE] Release Apache Arrow ${version} - RC${rc}
+
+Hi,
+
+I would like to propose the following release candidate (RC${rc}) of Apache
+Arrow version ${version}. This is a release consiting of ${n_resolved_issues}
+resolved JIRA issues[1].
+
+This release candidate is based on commit:
+${release_hash} [2]
+
+The source release rc${rc} is hosted at [3].
+The binary artifacts are hosted at [4][5][6][7].
+The changelog is located at [8].
+
+Please download, verify checksums and signatures, run the unit tests,
+and vote on the release. See [9] for how to validate a release candidate.
+
+The vote will be open for at least 72 hours.
+
+[ ] +1 Release this as Apache Arrow ${version}
+[ ] +0
+[ ] -1 Do not release this as Apache Arrow ${version} because...
+
+[1]: ${jira_url}/issues/?jql=${jql}
+[2]: https://github.com/apache/arrow/tree/${release_hash}
+[3]: ${rc_url}
+[4]: https://bintray.com/apache/arrow/centos-rc/${version}-rc${rc}
+[5]: https://bintray.com/apache/arrow/debian-rc/${version}-rc${rc}
+[6]: https://bintray.com/apache/arrow/python-rc/${version}-rc${rc}
+[7]: https://bintray.com/apache/arrow/ubuntu-rc/${version}-rc${rc}
+[8]: https://github.com/apache/arrow/blob/${release_hash}/CANGELOG.md
+[9]: https://cwiki.apache.org/confluence/display/ARROW/How+to+Verify+Release+Candidates
+MAIL
+echo "---------------------------------------------------------"
diff --git a/dev/release/js-source-release.sh b/dev/release/js-source-release.sh
deleted file mode 100755
index 368bcd150e..0000000000
--- a/dev/release/js-source-release.sh
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-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
- print_help_and_exit
-fi
-
-js_version=$1
-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
-
-# cd to $ARROW_HOME/js
-cd $SOURCE_DIR/../../js
-JS_SRC_DIR="$PWD"
-# npm pack the js source files
-npm install
-
-npm version --no-git-tag-version $js_version
-git add package.json
-git commit -m "[Release] Apache Arrow JavaScript $js_version"
-git tag -a ${tag}
-
-release_hash=`git rev-list $tag 2> /dev/null | head -n 1 `
-
-if [ -z "$release_hash" ]; then
- echo "Cannot continue: unknown git tag: $tag"
- exit
-fi
-
-echo "Using commit $release_hash"
-
-cd $SOURCE_DIR
-
-rm -rf js-tmp
-# `npm pack` writes the .tgz file to the current dir, so cd into js-tmp
-mkdir -p js-tmp
-cd js-tmp
-# run npm pack on `arrow/js`
-npm pack ${JS_SRC_DIR}
-# unzip and remove the npm pack tarball
-tar -xzf *.tgz && rm *.tgz
-# `npm pack` puts files in a dir called "package"
-cp $JS_SRC_DIR/../NOTICE.txt package
-cp $JS_SRC_DIR/../LICENSE.txt package
-# rename "package" to $tag
-mv package ${tag}
-tar czf ${tarball} ${tag}
-rm -rf ${tag}
-
-${SOURCE_DIR}/run-rat.sh ${tarball}
-
-# sign the archive
-gpg --armor --output ${tarball}.asc --detach-sig ${tarball}
-sha256sum $tarball > ${tarball}.sha256
-sha512sum $tarball > ${tarball}.sha512
-
-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}
-fi
-
-cd -
-
-# clean up
-rm -rf js-tmp
-
-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 "[email protected] mailing list"
-echo ""
-
-# Create the email template for the release candidate to be sent to the mailing lists.
-MESSAGE=$(cat <<__EOF__
-Subject: [VOTE] Release Apache Arrow JS ${js_version} - RC${rc}
-
-Hello all,
-
-I would 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.
-
-[ ] +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
diff --git a/dev/release/js-verify-release-candidate.sh b/dev/release/js-verify-release-candidate.sh
deleted file mode 100755
index edabb4c9d8..0000000000
--- a/dev/release/js-verify-release-candidate.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Requirements
-# - nodejs >= 6.0.0 (best way is to use nvm)
-
-case $# in
- 2) VERSION="$1"
- RC_NUMBER="$2"
- ;;
-
- *) echo "Usage: $0 X.Y.Z RC_NUMBER"
- exit 1
- ;;
-esac
-
-set -ex
-
-HERE=$(cd `dirname "${BASH_SOURCE[0]:-$0}"` && pwd)
-
-ARROW_DIST_URL='https://dist.apache.org/repos/dist/dev/arrow'
-
-download_dist_file() {
- curl -f -O $ARROW_DIST_URL/$1
-}
-
-download_rc_file() {
- download_dist_file apache-arrow-js-${VERSION}-rc${RC_NUMBER}/$1
-}
-
-import_gpg_keys() {
- download_dist_file KEYS
- gpg --import KEYS
-}
-
-fetch_archive() {
- local dist_name=$1
- download_rc_file ${dist_name}.tar.gz
- download_rc_file ${dist_name}.tar.gz.asc
- download_rc_file ${dist_name}.tar.gz.sha256
- download_rc_file ${dist_name}.tar.gz.sha512
- gpg --verify ${dist_name}.tar.gz.asc ${dist_name}.tar.gz
- if [ "$(uname)" == "Darwin" ]; then
- shasum -a 256 ${dist_name}.tar.gz | diff - ${dist_name}.tar.gz.sha256
- shasum -a 512 ${dist_name}.tar.gz | diff - ${dist_name}.tar.gz.sha512
- else
- sha256sum ${dist_name}.tar.gz | diff - ${dist_name}.tar.gz.sha256
- sha512sum ${dist_name}.tar.gz | diff - ${dist_name}.tar.gz.sha512
- fi
-}
-
-setup_tempdir() {
- cleanup() {
- rm -fr "$TMPDIR"
- }
- trap cleanup EXIT
- TMPDIR=$(mktemp -d -t "$1.XXXXX")
-}
-
-setup_tempdir "arrow-js-$VERSION"
-echo "Working in sandbox $TMPDIR"
-cd $TMPDIR
-
-VERSION=$1
-RC_NUMBER=$2
-
-TARBALL=apache-arrow-js-$1.tar.gz
-
-import_gpg_keys
-
-DIST_NAME="apache-arrow-js-${VERSION}"
-fetch_archive $DIST_NAME
-tar xvzf ${DIST_NAME}.tar.gz
-cd ${DIST_NAME}
-
-npm install
-# npx run-s clean:all lint create:testdata build
-# npm run test -- -t ts -u --integration
-# npm run test -- --integration
-npx run-s clean:all lint build
-npm run test
-
-echo 'Release candidate looks good!'
-exit 0
diff --git a/dev/release/post-03-ruby.sh b/dev/release/post-03-ruby.sh
new file mode 100755
index 0000000000..f4bb57c719
--- /dev/null
+++ b/dev/release/post-03-ruby.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+# -*- indent-tabs-mode: nil; sh-indentation: 2; sh-basic-offset: 2 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+set -e
+set -o pipefail
+
+SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ exit
+fi
+
+version=$1
+archive_name=apache-arrow-${version}
+tar_gz=${archive_name}.tar.gz
+
+rm -f ${tar_gz}
+curl \
+ --remote-name \
+ --fail \
+ https://www-us.apache.org/dist/arrow/arrow-${version}/${tar_gz}
+rm -rf ${archive_name}
+tar xf ${tar_gz}
+modules=()
+for module in ${archive_name}/ruby/red-*; do
+ pushd ${module}
+ rake release
+ modules+=($(basename ${module}))
+ popd
+done
+rm -rf ${archive_name}
+rm -f ${tar_gz}
+
+echo "Success! The released RubyGems are available here:"
+for module in ${modules[@]}; do
+ echo " https://rubygems.org/gems/${module}/versions/${version}"
+done
diff --git a/dev/release/post-04-js.sh b/dev/release/post-04-js.sh
new file mode 100755
index 0000000000..ea702dd01e
--- /dev/null
+++ b/dev/release/post-04-js.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+# -*- indent-tabs-mode: nil; sh-indentation: 2; sh-basic-offset: 2 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+set -e
+
+SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ exit
+fi
+
+version=$1
+archive_name=apache-arrow-${version}
+tar_gz=${archive_name}.tar.gz
+
+rm -f ${tar_gz}
+curl \
+ --remote-name \
+ --fail \
+ https://www-us.apache.org/dist/arrow/arrow-${version}/${tar_gz}
+rm -rf ${archive_name}
+tar xf ${tar_gz}
+pushd ${archive_name}/js
+./npm-release.sh
+popd
+rm -rf ${archive_name}
+rm -f ${tar_gz}
+
+echo "Success! The released npm packages are available here:"
+echo " https://www.npmjs.com/package/apache-arrow/v/${version}"