Apache DataFusion SQL Query Engine
ARROW-936: fix release README
Julien Le Deme547d2111558
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.shindex 00af5e7768..398f15d827 100644--- a/dev/release/00-prepare.sh+++ b/dev/release/00-prepare.sh@@ -17,30 +17,30 @@# specific language governing permissions and limitations# under the License.#+set -eSOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"-if [ -z "$1" ]; then- echo "Usage: $0 <version> <nextVersion>"- exit-fi+if [ "$#" -eq 3 ]; then+ version=$1+ nextVersion=$2+ nextVersionSNAPSHOT=${nextVersion}-SNAPSHOT+ rcnum=$3+ tag=apache-arrow-${version}-rc${rcnum}-if [ -z "$2" ]; then- echo "Usage: $0 <version> <nextVersion>"- exit-fi+ echo "prepare release ${version} rc ${rcnum} on tag ${tag} then reset to version ${nextVersionSNAPSHOT}"-version=$1+ cd "${SOURCE_DIR}/../../java"-tag=apache-arrow-${version}+ mvn release:clean+ mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${nextVersionSNAPSHOT}-nextVersion=$2+ cd --cd "${SOURCE_DIR}/../../java"+ echo "Finish staging binary artifacts by running: sh dev/release/01-perform.sh"-mvn release:clean-mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${nextVersion}-SNAPSHOT--cd -+else+ echo "Usage: $0 <version> <nextVersion> <rc-num>"+ exit+fi-echo "Finish staging binary artifacts by running: sh dev/release/01-perform.sh"diff --git a/dev/release/01-perform.sh b/dev/release/01-perform.shindex d7140f6cba..876dae8442 100644--- a/dev/release/01-perform.sh+++ b/dev/release/01-perform.sh@@ -17,6 +17,7 @@# specific language governing permissions and limitations# under the License.#+set -eSOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"diff --git a/dev/release/02-source.sh b/dev/release/02-source.shindex 924b94fd6c..3bb7204598 100755--- a/dev/release/02-source.sh+++ b/dev/release/02-source.sh@@ -17,15 +17,11 @@# specific language governing permissions and limitations# under the License.#+set -eSOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"-if [ -z "$1" ]; then- echo "Usage: $0 <version> <rc-num>"- exit-fi--if [ -z "$2" ]; then+if [ "$#" -ne 2 ]; thenecho "Usage: $0 <version> <rc-num>"exitfi@@ -38,42 +34,42 @@ if [ -d tmp/ ]; thenexitfi-tag=apache-arrow-$version+tag=apache-arrow-${version}tagrc=${tag}-rc${rc}-echo "Preparing source for $tagrc"+echo "Preparing source for ${tagrc}"-release_hash=`git rev-list $tag 2> /dev/null | head -n 1 `+release_hash=`git rev-list $tagrc 2> /dev/null | head -n 1 `if [ -z "$release_hash" ]; then- echo "Cannot continue: unknown git tag: $tag"+ echo "Cannot continue: unknown git tag: $tagrc"exitfiecho "Using commit $release_hash"-tarball=$tag.tar.gz+tarball=${tag}.tar.gzextract_dir=tmp-apache-arrow-rm -rf $extract_dir+rm -rf ${extract_dir}# be conservative and use the release hash, even though git produces the same# archive (identical hashes) using the scm tag-git archive $release_hash --prefix $extract_dir/ | tar xf -+git archive ${release_hash} --prefix ${extract_dir}/ | tar xf -# build Apache Arrow C++ before building Apache Arrow GLib because# Apache Arrow GLib requires Apache Arrow C++.-mkdir -p $extract_dir/cpp/build-cpp_install_dir=$PWD/$extract_dir/cpp/install-cd $extract_dir/cpp/build+mkdir -p ${extract_dir}/cpp/build+cpp_install_dir=${PWD}/${extract_dir}/cpp/install+cd ${extract_dir}/cpp/buildcmake .. \- -DCMAKE_INSTALL_PREFIX=$cpp_install_dir \+ -DCMAKE_INSTALL_PREFIX=${cpp_install_dir} \-DARROW_BUILD_TESTS=nomake -j8make installcd -# build source archive for Apache Arrow GLib by "make dist".-cd $extract_dir/c_glib+cd ${extract_dir}/c_glib./autogen.sh./configure \PKG_CONFIG_PATH=$cpp_install_dir/lib/pkgconfig \@@ -84,38 +80,38 @@ tar xzf *.tar.gzrm *.tar.gzcd -rm -rf tmp-c_glib/-mv $extract_dir/c_glib/apache-arrow-glib-* tmp-c_glib/-rm -rf $extract_dir+mv ${extract_dir}/c_glib/apache-arrow-glib-* tmp-c_glib/+rm -rf ${extract_dir}# replace c_glib/ by tar.gz generated by "make dist"-rm -rf $tag-git archive $release_hash --prefix $tag/ | tar xf --rm -rf $tag/c_glib-mv tmp-c_glib $tag/c_glib-tar czf $tarball $tag-rm -rf $tag+rm -rf ${tag}+git archive $release_hash --prefix ${tag}/ | tar xf -+rm -rf ${tag}/c_glib+mv tmp-c_glib ${tag}/c_glib+tar czf ${tarball} ${tag}+rm -rf ${tag}-${SOURCE_DIR}/run-rat.sh $tarball+${SOURCE_DIR}/run-rat.sh ${tarball}# sign the archive-gpg --armor --output ${tarball}.asc --detach-sig $tarball-gpg --print-md MD5 $tarball > ${tarball}.md5+gpg --armor --output ${tarball}.asc --detach-sig ${tarball}+gpg --print-md MD5 ${tarball} > ${tarball}.md5shasum $tarball > ${tarball}.sha# check out the arrow RC foldersvn co --depth=empty https://dist.apache.org/repos/dist/dev/arrow tmp# add the release candidate for the tag-mkdir -p tmp/$tagrc-cp ${tarball}* tmp/$tagrc-svn add tmp/$tagrc-svn ci -m 'Apache Arrow $version RC${rc}' tmp/$tagrc+mkdir -p tmp/${tagrc}+cp ${tarball}* tmp/${tagrc}+svn add tmp/${tagrc}+svn ci -m 'Apache Arrow ${version} RC${rc}' tmp/${tagrc}# clean uprm -rf tmpecho "Success! The release candidate is available here:"-echo " https://dist.apache.org/repos/dist/dev/arrow/$tagrc"+echo " https://dist.apache.org/repos/dist/dev/arrow/${tagrc}"echo ""-echo "Commit SHA1: $release_hash"+echo "Commit SHA1: ${release_hash}"diff --git a/dev/release/README b/dev/release/READMEindex 07402030bf..265a23494e 100644--- a/dev/release/README+++ b/dev/release/README@@ -1,17 +1,24 @@requirements:- being a committer to be able to push to dist and maven repository- a gpg key to sign the artifacts+- use java 7. check your JAVA_HOME environment variable (at least for now. See ARROW-930)+- have the build requirements for cpp and c_glibg installed (see their README)to release, run the following (replace 0.1.0 with version to release):#create a release branchgit co -b release-0_1_0-# prepare release v 0.1.0 (run tests, sign artifacts). Next version will be 0.1.1-SNAPSHOT-dev/release/00-prepare.sh 0.1.0 0.1.1+#setup gpg agent for signing artifacts+source dev/release/setup-gpg-agent.sh++# prepare release v 0.1.0 (run tests, sign artifacts). Next version will be 0.1.1-SNAPSHOT, RC 0+sh dev/release/00-prepare.sh 0.1.0 0.1.1 0+# push the tag+git push apache apache-arrow-0.1.0-rc0# tag and push to maven repo (repo will have to be finalized separately)-dev/release/01-perform.sh+sh dev/release/01-perform.sh# create the source release-dev/release/02-source.sh 0.1.0 0+sh dev/release/02-source.sh 0.1.0 0useful commands:- to set the mvn version in the poms