Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 ee514f7f4 -> 44fe7ddee
PHOENIX-4291 Merge release script for mac and linux Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/44fe7dde Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/44fe7dde Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/44fe7dde Branch: refs/heads/4.x-HBase-0.98 Commit: 44fe7ddee9d4ef35521c7855b21fc416a5e95d4d Parents: ee514f7 Author: Mujtaba <mujt...@apache.org> Authored: Fri Nov 3 11:51:51 2017 -0700 Committer: Mujtaba <mujt...@apache.org> Committed: Fri Nov 3 11:51:51 2017 -0700 ---------------------------------------------------------------------- dev/make_rc.sh | 25 +++++++--- dev/make_rc_on_mac.sh | 121 --------------------------------------------- 2 files changed, 17 insertions(+), 129 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/44fe7dde/dev/make_rc.sh ---------------------------------------------------------------------- diff --git a/dev/make_rc.sh b/dev/make_rc.sh index 4cc758f..31cb9f9 100755 --- a/dev/make_rc.sh +++ b/dev/make_rc.sh @@ -43,7 +43,7 @@ DIR_DOCS=dev/release_files # Verify no target exists mvn clean; rm -rf $DIR_REL_BASE; -RESULT=$(find -iname target) +RESULT=$(find . -iname target) if [ -z "$RESULT" ] then @@ -73,12 +73,11 @@ mvn clean apache-rat:check package -DskipTests -Dcheckstyle.skip=true -q; rm -rf $(find . -type d -name archive-tmp); # Copy all phoenix-*.jars to release dir -phx_jars=$(find -iwholename "./*/target/phoenix-*.jar") +phx_jars=$(find . -iwholename "./*/target/phoenix-*.jar") cp $phx_jars $DIR_REL_BIN_PATH; # Copy bin cp bin/* $DIR_BIN; -echo "cp -R $DIR_PHERF_CONF $DIR_BIN;" cp -R $DIR_PHERF_CONF $DIR_BIN; # Copy release docs @@ -98,10 +97,20 @@ echo "Now signing source and binary tars" # Sign function_sign() { phoenix_tar=$(find apache-phoenix-*.gz); - gpg --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar; - md5sum -b $phoenix_tar > $phoenix_tar.md5; - sha512sum -b $phoenix_tar > $phoenix_tar.sha; - sha256sum -b $phoenix_tar >> $phoenix_tar.sha; + + # if on MAC OS + if [[ "$OSTYPE" == "darwin"* ]]; then + gpg2 --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar; + openssl md5 $phoenix_tar > $phoenix_tar.md5; + openssl dgst -sha512 $phoenix_tar > $phoenix_tar.sha; + openssl dgst -sha256 $phoenix_tar >> $phoenix_tar.sha; + # all other OS + else + gpg --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar; + md5sum -b $phoenix_tar > $phoenix_tar.md5; + sha512sum -b $phoenix_tar > $phoenix_tar.sha; + sha256sum -b $phoenix_tar >> $phoenix_tar.sha; + fi } cd $DIR_REL_BIN_TAR_PATH; function_sign; @@ -112,7 +121,7 @@ read -p "Do you want add tag for this RC in GIT? (Y for yes or any other key to if [[ $prompt =~ [yY](es)* ]] then echo "Tagging..." - read -p "Enter tag (Example 5.0.0-rc0):" prompt + read -p "Enter tag (Example 4.13.0-HBase-0.98-rc0):" prompt echo "Setting tag: $prompt";sleep 5s git tag -a $prompt -m "$prompt"; git push origin $prompt mv $DIR_REL_ROOT $DIR_REL_BASE/phoenix-$prompt http://git-wip-us.apache.org/repos/asf/phoenix/blob/44fe7dde/dev/make_rc_on_mac.sh ---------------------------------------------------------------------- diff --git a/dev/make_rc_on_mac.sh b/dev/make_rc_on_mac.sh deleted file mode 100755 index 0b924f1..0000000 --- a/dev/make_rc_on_mac.sh +++ /dev/null @@ -1,121 +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 - -echo "Script that assembles all you need to make an RC." -echo "It generates source and binary tar in release directory" -echo "Presumes that you can sign a release as described at https://www.apache.org/dev/release-signing.html" -echo "Starting...";sleep 2s - -# Set directory variables -DIR_ROOT="$(cd $(dirname $0);pwd)/.." -cd $DIR_ROOT -PHOENIX="$(xmllint --xpath "//*[local-name()='project']/*[local-name()='version']/text()" pom.xml)" -DIR_REL_BASE=$DIR_ROOT/release -DIR_REL_ROOT=$DIR_REL_BASE/apache-phoenix-$PHOENIX -DIR_REL_BIN=apache-phoenix-$PHOENIX-bin -DIR_REL_BIN_PATH=$DIR_REL_ROOT/$DIR_REL_BIN -REL_SRC=apache-phoenix-$PHOENIX-src -DIR_REL_SRC_TAR_PATH=$DIR_REL_ROOT/src -DIR_REL_BIN_TAR_PATH=$DIR_REL_ROOT/bin -DIR_BIN=$DIR_REL_BIN_PATH/bin -DIR_PHERF_CONF=phoenix-pherf/config -DIR_EXAMPLES=$DIR_REL_BIN_PATH/examples -DIR_DOCS=dev/release_files - -# Verify no target exists -mvn clean; rm -rf $DIR_REL_BASE; -RESULT=$(find . -iname target) - -if [ -z "$RESULT" ] -then - echo "Verified target directory does not exist."; -else - echo "Target directory exists at: $RESULT. Please use a clean repo."; - exit -1; -fi - -# Generate src tar -ln -s . $REL_SRC; tar cvzf $REL_SRC.tar.gz --exclude="$REL_SRC/$REL_SRC" $REL_SRC/*; rm $REL_SRC; - -# Generate directory structure -mkdir $DIR_REL_BASE; -mkdir $DIR_REL_ROOT; -mkdir $DIR_REL_BIN_PATH; -mkdir $DIR_REL_BIN_TAR_PATH; -mkdir $DIR_REL_SRC_TAR_PATH; -mkdir $DIR_EXAMPLES; -mkdir $DIR_BIN; - -# Move src tar -mv $REL_SRC.tar.gz $DIR_REL_SRC_TAR_PATH; - -# Copy common jars -mvn clean apache-rat:check package -DskipTests -Dcheckstyle.skip=true -q; -rm -rf $(find . -type d -name archive-tmp); - -# Copy all phoenix-*.jars to release dir -phx_jars=$(find . -iwholename "./*/target/phoenix-*.jar") -cp $phx_jars $DIR_REL_BIN_PATH; - -# Copy bin -cp bin/* $DIR_BIN; -cp -R $DIR_PHERF_CONF $DIR_BIN; - -# Copy release docs - -cp $DIR_DOCS/* $DIR_REL_BIN_PATH; - -# Copy examples -cp -r examples/* $DIR_EXAMPLES - -# Generate bin tar -tar cvzf $DIR_REL_BIN_TAR_PATH/$DIR_REL_BIN.tar.gz -C $DIR_REL_ROOT apache-phoenix-$PHOENIX-bin; -rm -rf $DIR_REL_BIN_PATH; - -echo "DONE generating binary and source tars in release directory." -echo "Now signing source and binary tars" - -# Sign -function_sign() { - phoenix_tar=$(find apache-phoenix-*.gz); - gpg2 --armor --output $phoenix_tar.asc --detach-sig $phoenix_tar; - openssl md5 $phoenix_tar > $phoenix_tar.md5; - openssl dgst -sha512 $phoenix_tar > $phoenix_tar.sha; - openssl dgst -sha256 $phoenix_tar >> $phoenix_tar.sha; -} - -cd $DIR_REL_BIN_TAR_PATH; function_sign; -cd $DIR_REL_SRC_TAR_PATH; function_sign; - -# Tag -read -p "Do you want add tag for this RC in GIT? (Y for yes or any other key to continue)" prompt -if [[ $prompt =~ [yY](es)* ]] -then - echo "Tagging..." - read -p "Enter tag (Example 5.0.0-rc0):" prompt - echo "Setting tag: $prompt";sleep 5s - git tag -a $prompt -m "$prompt"; git push origin $prompt - mv $DIR_REL_ROOT $DIR_REL_BASE/phoenix-$prompt -fi - -echo "DONE." -echo "If all looks good in release directory then commit RC at https://dist.apache.org/repos/dist/dev/phoenix"