Apache DataFusion SQL Query Engine
ARROW-298: create release scripts
Julien Le Dem0b9d947fbe19
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.shnew file mode 100644index 0000000000..3c1fb9a093--- /dev/null+++ b/dev/release/00-prepare.sh@@ -0,0 +1,46 @@+#!/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.+#++SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"++if [ -z "$1" ]; then+ echo "Usage: $0 <version> <nextVersion>"+ exit+fi++if [ -z "$2" ]; then+ echo "Usage: $0 <version> <nextVersion>"+ exit+fi++version=$1++tag=apache-arrow-${version}++nextVersion=$2++cd "${SOURCE_DIR}/../../java"++mvn release:clean+mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${nextVersion}-SNAPSHOT++cd -++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.shnew file mode 100644index 0000000000..d7140f6cba--- /dev/null+++ b/dev/release/01-perform.sh@@ -0,0 +1,27 @@+#!/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.+#++SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"++cd "${SOURCE_DIR}/../../java"++mvn release:perform++cd -diff --git a/dev/release/02-source.sh b/dev/release/02-source.shnew file mode 100644index 0000000000..f44692d5e9--- /dev/null+++ b/dev/release/02-source.sh@@ -0,0 +1,80 @@+#!/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.+#++if [ -z "$1" ]; then+ echo "Usage: $0 <version> <rc-num>"+ exit+fi++if [ -z "$2" ]; then+ echo "Usage: $0 <version> <rc-num>"+ exit+fi++version=$1+rc=$2++if [ -d tmp/ ]; then+ echo "Cannot run: tmp/ exists"+ exit+fi++tag=apache-arrow-$version+tagrc=${tag}-rc${rc}++echo "Preparing source for $tagrc"++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"++tarball=$tag.tar.gz++# 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 $tag/ -o $tarball++# sign the archive+gpg --armor --output ${tarball}.asc --detach-sig $tarball+gpg --print-md MD5 $tarball > ${tarball}.md5+shasum $tarball > ${tarball}.sha++# check out the parquet RC folder+svn 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++# clean up+rm -rf 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"+diff --git a/dev/release/README b/dev/release/READMEnew file mode 100644index 0000000000..4fcc5d9728--- /dev/null+++ b/dev/release/README@@ -0,0 +1,15 @@+requirements:+- being a committer to be able to push to dist and maven repository+- a gpg key to sign the artifacts++to release, run the following (replace 0.1.0 with version to release):+# 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+# tag and push to maven repo (repo will have to be finalized separately)+dev/release/01-perform.sh+# create the source release+dev/release/02-source.sh 0.1.0 0++useful commands:+to set the mvn version in the poms+mvn versions:set -DnewVersion=0.1-SNAPSHOT