You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2020/11/13 09:07:11 UTC
[phoenix] branch master updated: PHOENIX-6216 Add Omid and Tephra
support to create-release script
This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new 51dce95 PHOENIX-6216 Add Omid and Tephra support to create-release script
51dce95 is described below
commit 51dce95f29633daf3c19839c26b028207484898e
Author: Istvan Toth <st...@apache.org>
AuthorDate: Mon Nov 9 13:16:51 2020 +0100
PHOENIX-6216 Add Omid and Tephra support to create-release script
---
dev/create-release/release-build.sh | 4 +--
dev/create-release/release-util.sh | 49 +++++++++++++++++++++++++------------
2 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/dev/create-release/release-build.sh b/dev/create-release/release-build.sh
index a1442e4..95dc618 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -215,8 +215,8 @@ if [[ "$1" == "publish-dist" ]]; then
echo "Packaging release source tarballs"
make_src_release "${PROJECT}" "${RELEASE_VERSION}"
- # we do not have binary tarballs for phoenix-thirdparty
- if [[ "${PROJECT}" != "phoenix-thirdparty" ]]; then
+ # we do not have binary tarballs for phoenix-thirdparty, omid and tephra
+ if [[ "${PROJECT}" != "phoenix-thirdparty" && "${PROJECT}" != "phoenix-omid" && "${PROJECT}" != "phoenix-tephra" ]]; then
make_binary_release "${PROJECT}" "${RELEASE_VERSION}"
fi
diff --git a/dev/create-release/release-util.sh b/dev/create-release/release-util.sh
index 442f375..8f575b4 100755
--- a/dev/create-release/release-util.sh
+++ b/dev/create-release/release-util.sh
@@ -25,6 +25,7 @@ if [ -n "${GPG_KEY}" ]; then
fi
# Maven Profiles for publishing snapshots and release to Maven Central and Dist
PUBLISH_PROFILES=("-P" "apache-release,release")
+OMID_VARIANTS=( "-Phbase-1" "-Phbase-2" )
set -e
@@ -636,12 +637,22 @@ function kick_gpg_agent {
# Do maven command to set version into local pom
function maven_set_version { #input: <version_to_set>
local this_version="$1"
- echo "${MVN[@]}" versions:set -DnewVersion="$this_version"
- "${MVN[@]}" versions:set -DnewVersion="$this_version" | grep -v "no value" # silence logs
- #Hacking around nonstandard maven submodules
+ # Omid needs an hbase profile for tagging (doesn't matter which one, the shims need special handling anyway)
+ if [[ "$PROJECT" == "phoenix-omid" ]]; then
+ local variant="${OMID_VARIANTS[1]}"
+ fi
+ echo "${MVN[@]}" ${variant:+"$variant"} versions:set -DnewVersion="$this_version"
+ "${MVN[@]}" ${variant:+"$variant"} versions:set -DnewVersion="$this_version" | grep -v "no value" # silence logs
+ #Hacking around nonstandard maven submodules for phoenix only
for i in phoenix-hbase-compat-*; do
if [ -e "$i" ]; then
- "${MVN[@]}" -pl $i versions:set -DnewVersion="$this_version" | grep -v "no value" # silence logs
+ "${MVN[@]}" ${variant:+"$variant"} -pl $i versions:set -DnewVersion="$this_version" | grep -v "no value" # silence logs
+ fi
+ done
+ #Omid has an even more nonstandard maven structure, and needs more hacks
+ for i in hbase-shims/hbase-*; do
+ if [ -e "$i" ]; then
+ sed -i -e "0,\#<version>.*</version>#{s##<version>${this_version}</version>#}" $i/pom.xml
fi
done
}
@@ -683,17 +694,25 @@ function maven_deploy { #inputs: <snapshot|release> <log_file_path>
if ! is_dry_run; then
mvn_goals=("${mvn_goals[@]}" deploy)
fi
- echo "${MVN[@]}" -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}" \
- "${mvn_goals[@]}"
- echo "Logging to ${mvn_log_file}. This will take a while..."
- rm -f "$mvn_log_file"
- # The tortuous redirect in the next command allows mvn's stdout and stderr to go to mvn_log_file,
- # while also sending stderr back to the caller.
- # shellcheck disable=SC2094
- if ! "${MVN[@]}" -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}" \
- "${mvn_goals[@]}" 1>> "$mvn_log_file" 2> >( tee -a "$mvn_log_file" >&2 ); then
- error "Deploy build failed, for details see log at '$mvn_log_file'."
- fi
+ # Omid needs to be deployed twice for HBase 1 and 2
+ if [[ "$PROJECT" == "phoenix-omid" ]]; then
+ local variants=( "${OMID_VARIANTS[@]}" )
+ else
+ local variants=( "" )
+ fi
+ for variant in "${variants[@]}"; do
+ echo "${MVN[@]}" -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}" ${variant:+"$variant"} \
+ "${mvn_goals[@]}"
+ echo "Logging to ${mvn_log_file}. This will take a while..."
+ rm -f "$mvn_log_file"
+ # The tortuous redirect in the next command allows mvn's stdout and stderr to go to mvn_log_file,
+ # while also sending stderr back to the caller.
+ # shellcheck disable=SC2094
+ if ! "${MVN[@]}" -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}" ${variant:+"$variant"} \
+ "${mvn_goals[@]}" 1>> "$mvn_log_file" 2> >( tee -a "$mvn_log_file" >&2 ); then
+ error "Deploy build failed, for details see log at '$mvn_log_file'."
+ fi
+ done
echo "BUILD SUCCESS."
stop_step "${timing_token}"
return 0