This is an automated email from the ASF dual-hosted git repository.
upthewaterspout pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 45c9538 Adding a couple of scripts to automate release candidates
45c9538 is described below
commit 45c9538da13227e4fc59e68c14d76041bba54d29
Author: Dan Smith <[email protected]>
AuthorDate: Thu Apr 25 11:41:36 2019 -0700
Adding a couple of scripts to automate release candidates
Adding a script to build a release candidate.
Adding another script to create an email template.
---
dev-tools/release/README.md | 8 ++
dev-tools/release/prepare_rc.sh | 160 ++++++++++++++++++++++++++++++++++++
dev-tools/release/print_rc_email.sh | 87 ++++++++++++++++++++
3 files changed, 255 insertions(+)
diff --git a/dev-tools/release/README.md b/dev-tools/release/README.md
new file mode 100644
index 0000000..0e50866
--- /dev/null
+++ b/dev-tools/release/README.md
@@ -0,0 +1,8 @@
+This directory contains scripts to help create a release of geode.
+
+Most of the release steps are documented in the wiki.
+See https://cwiki.apache.org/confluence/display/GEODE/Releasing+Apache+Geode
+
+Scripts
+prepare_rc.sh: Checks out the various geode repos and builds a release
candidate, ready to be published
+print_rc_email.sh: Generates an email to send to the dev list announcing a
release candidate
diff --git a/dev-tools/release/prepare_rc.sh b/dev-tools/release/prepare_rc.sh
new file mode 100755
index 0000000..318d871
--- /dev/null
+++ b/dev-tools/release/prepare_rc.sh
@@ -0,0 +1,160 @@
+#!/usr/bin/env 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
+
+usage() {
+ echo "Usage: prepare_rc -v version_number -k signing_key"
+ echo " -v The #.#.#.RC# version number"
+ echo " -k Your 8 digit PGP key id. Must be 8 digits. Also the last 8
digits of your gpg fingerprint"
+ exit 1
+}
+
+checkCommand() {
+ COMMAND=$1
+ if ! [[ -x "$(command -v $COMMAND)" ]]; then
+ echo "$COMMAND must be installed"
+ exit 1
+ fi
+}
+
+FULL_VERSION=""
+SIGNING_KEY=""
+
+while getopts ":v:k:" opt; do
+ case ${opt} in
+ v )
+ FULL_VERSION=$OPTARG
+ ;;
+ k )
+ SIGNING_KEY=$OPTARG
+ ;;
+ \? )
+ usage
+ ;;
+ esac
+done
+
+if [[ ${FULL_VERSION} == "" ]] || [[ ${SIGNING_KEY} == "" ]]; then
+ usage
+fi
+
+if [[ $FULL_VERSION =~ ([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+) ]]; then
+ VERSION=${BASH_REMATCH[1]}
+ RC=${BASH_REMATCH[2]}
+else
+ echo "Malformed version number ${FULL_VERSION}. Example valid number -
1.9.0.RC1"
+ exit 1
+fi
+
+checkCommand gpg
+checkCommand cmake
+checkCommand svn
+checkCommand doxygen
+
+
+GEODE=$PWD/build/geode
+GEODE_EXAMPLES=$PWD/build/geode-examples
+GEODE_NATIVE=$PWD/build/geode-native
+SVN_DIR=$PWD/build/dist/dev/geode
+
+echo "============================================================"
+echo "Cleaning build directory..."
+echo "============================================================"
+rm -rf build
+mkdir -p build
+cd build
+
+
+
+echo "============================================================"
+echo "Cloning repositories..."
+echo "============================================================"
+set -x
+git clone --branch release/${VERSION} [email protected]:apache/geode.git
+git clone --branch release/${VERSION} [email protected]:apache/geode-examples.git
+git clone --branch release/${VERSION} [email protected]:apache/geode-native.git
+
+svn checkout https://dist.apache.org/repos/dist --depth empty
+svn update --set-depth infinity --parents dist/dev/geode
+
+
+set +x
+echo "============================================================"
+echo "Building projects..."
+echo "============================================================"
+
+echo "============================================================"
+echo "Building geode..."
+echo "============================================================"
+
+cd ${GEODE}
+set -x
+git clean -fdx && ./gradlew build publishToMavenLocal -Paskpass
-Psigning.keyId=${SIGNING_KEY}
-Psigning.secretKeyRingFile=${HOME}/.gnupg/secring.gpg
+set +x
+
+
+echo "============================================================"
+echo "Building geode-examples..."
+echo "============================================================"
+
+cd ${GEODE_EXAMPLES}
+set -x
+git clean -dxf && ./gradlew -PsignArchives
-PgeodeReleaseUrl="file://${GEODE}/geode-assembly/build/geode-assembly/build/distributions/apache-geode-${VERSION}"
-PgeodeRepositoryUrl="file://${HOME}/.m2/repository"
-Psigning.keyId=${SIGNING_KEY}
-Psigning.secretKeyRingFile=${HOME}/.gnupg/secring.gpg build
+set +x
+
+echo "============================================================"
+echo "Building geode-native..."
+echo "============================================================"
+
+cd ${GEODE_NATIVE}
+mkdir build
+cd build
+cmake .. -DPRODUCT_VERSION=${VERSION}
-DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2q/
-DGEODE_ROOT=${GEODE}/geode-assembly/build/install/apache-geode
+cpack -G TGZ --config CPackSourceConfig.cmake
+gpg --armor -u ${SIGNING_KEY} -b apache-geode-native-${VERSION}-src.tar.gz
+set +x
+
+
+echo "============================================================"
+echo "Tagging the release candidate in each repository. The tags will not be
pushed yet..."
+echo "============================================================"
+
+cd ${GEODE}
+git tag -s -u ${SIGNING_KEY} rel/v${FULL_VERSION} -m "Release candidate
${FULL_VERSION}"
+cd ${GEODE_EXAMPLES}
+git tag -s -u ${SIGNING_KEY} rel/v${FULL_VERSION} -m "Release candidate
${FULL_VERSION}"
+cd ${GEODE_NATIVE}
+git tag -s -u ${SIGNING_KEY} rel/v${FULL_VERSION} -m "Release candidate
${FULL_VERSION}"
+
+echo "============================================================"
+echo "Copying artifacts to svn directory for publication. The artifacts will
not be committed..."
+echo "============================================================"
+
+cd ${SVN_DIR}
+cp ${GEODE}/KEYS .
+mkdir ${FULL_VERSION}
+cp ${GEODE}/geode-assembly/build/distributions/* ${FULL_VERSION}
+
+cp ${GEODE_EXAMPLES}/build/distributions/* ${FULL_VERSION}
+
+cp ${GEODE_NATIVE}/build/apache-geode-native-${VERSION}* ${FULL_VERSION}
+svn add ${FULL_VERSION}
+
+echo "============================================================"
+echo "Done preparing the release! Please review the artifacts and publish
them."
+echo "============================================================"
diff --git a/dev-tools/release/print_rc_email.sh
b/dev-tools/release/print_rc_email.sh
new file mode 100755
index 0000000..5fea6e3
--- /dev/null
+++ b/dev-tools/release/print_rc_email.sh
@@ -0,0 +1,87 @@
+#!/usr/bin/env 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
+
+usage() {
+ echo "Usage: print_rc_email.sh -v version_number -m maven_repo_id"
+ echo " -v The #.#.#.RC# version number"
+ echo " -m The 4 digit id of the nexus maven repo"
+ exit 1
+}
+
+FULL_VERSION=""
+MAVEN=""
+
+while getopts ":v:m:" opt; do
+ case ${opt} in
+ v )
+ FULL_VERSION=$OPTARG
+ ;;
+ m )
+ MAVEN=$OPTARG
+ ;;
+ \? )
+ usage
+ ;;
+ esac
+done
+
+if [[ ${FULL_VERSION} == "" ]] || [[ ${MAVEN} == "" ]]; then
+ usage
+fi
+
+if [[ $FULL_VERSION =~ ([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+) ]]; then
+ VERSION=${BASH_REMATCH[1]}
+ RC=${BASH_REMATCH[2]}
+else
+ echo "Malformed version number ${FULL_VERSION}. Example valid number -
1.9.0.RC1"
+ exit 1
+fi
+
+cat << EOF
+Hello Geode dev community,
+
+This is a release candidate for Apache Geode, version ${FULL_VERSION}.
+Thanks to all the community members for their contributions to this release!
+
+Please do a review and give your feedback. The deadline is 3PM PST $(date -v
+5d "+%a, %B %d %Y").
+Release notes can be found at:
https://cwiki.apache.org/confluence/display/GEODE/Release+Notes#ReleaseNotes-${VERSION}
+
+Please note that we are voting upon the source tags: rel/v${FULL_VERSION}
+
+Apache Geode:
+https://github.com/apache/geode/tree/rel/v${FULL_VERSION}
+Apache Geode examples:
+https://github.com/apache/geode-examples/tree/rel/v${FULL_VERSION}
+Apache Geode native:
+https://github.com/apache/geode-native/tree/rel/v${FULL_VERSION}
+
+Source and binary files:
+https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/
+
+Maven staging repo:
+https://repository.apache.org/content/repositories/orgapachegeode-${MAVEN}
+
+Geode's KEYS file containing PGP keys we use to sign the release:
+https://github.com/apache/geode/blob/develop/KEYS
+
+PS: Command to run geode-examples: ./gradlew
-PgeodeReleaseUrl=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}
-PgeodeRepositoryUrl=https://repository.apache.org/content/repositories/orgapachegeode-${MAVEN}
build runAll
+
+Regards
+$(git config --get user.name)
+EOF