From 4b99816dd64fb6cfe3f4585b64884cb9847c05a6 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Tue, 19 Nov 2019 08:28:43 +0800 Subject: [PATCH] HBASE-23182 The create-release scripts are broken (#736) Signed-off-by: stack Signed-off-by: Bharath Vissapragada --- dev-support/create-release/release-build.sh | 10 +++++----- dev-support/create-release/release-util.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev-support/create-release/release-build.sh b/dev-support/create-release/release-build.sh index 443565bbc5a..596a58ace74 100755 --- a/dev-support/create-release/release-build.sh +++ b/dev-support/create-release/release-build.sh @@ -126,7 +126,7 @@ if [ -z "$VERSION" ]; then fi # Profiles for publishing snapshots and release to Maven Central -PUBLISH_PROFILES="-Papache-release -Prelease" +PUBLISH_PROFILES="-P apache-release,release" # This is a band-aid fix to avoid the failure of Maven nightly snapshot in some Jenkins # machines by explicitly calling /usr/sbin/lsof. Please see SPARK-22377 and the discussion @@ -210,7 +210,7 @@ if [[ "$1" == "publish-snapshot" ]]; then fi # Coerce the requested version $MVN versions:set -DnewVersion=$VERSION - $MVN --settings $tmp_settings -DskipTests $PUBLISH_PROFILES deploy + $MVN --settings $tmp_settings -DskipTests "$PUBLISH_PROFILES" deploy cd .. exit 0 fi @@ -235,12 +235,12 @@ if [[ "$1" == "publish-release" ]]; then $MVN versions:set -DnewVersion=$VERSION MAVEN_OPTS="${MAVEN_OPTS}" ${MVN} --settings $tmp_settings \ clean install -DskipTests \ - -Dcheckstyle.skip=true ${PUBLISH_PROFILES} \ + -Dcheckstyle.skip=true "${PUBLISH_PROFILES}" \ -Dmaven.repo.local="${tmp_repo}" pushd "${tmp_repo}/${groupid_as_dir}" # Remove any extra files generated during install # Remove extaneous files from module subdirs - find $modules -type f | grep -v \.jar | grep -v \.pom | xargs rm + find $modules -type f | grep -v \.jar | grep -v \.pom | xargs rm -rf # Using Nexus API documented here: # https://support.sonatype.com/entries/39720203-Uploading-to-a-Staging-Repository-via-REST-API @@ -280,7 +280,7 @@ if [[ "$1" == "publish-release" ]]; then if ! is_dry_run; then nexus_upload=$NEXUS_ROOT/deployByRepositoryId/$staged_repo_id - echo "Uplading files to $nexus_upload" + echo "Uploading files to $nexus_upload" for file in $(find ${modules} -type f) do # strip leading ./ diff --git a/dev-support/create-release/release-util.sh b/dev-support/create-release/release-util.sh index f1d58987312..38a8b0ec94e 100755 --- a/dev-support/create-release/release-util.sh +++ b/dev-support/create-release/release-util.sh @@ -378,8 +378,8 @@ make_binary_release() { # Check there is a bin gz output. The build may not produce one: e.g. hbase-thirdparty. f_bin_tgz="./${PROJECT}-assembly/target/${basename}*-bin.tar.gz" - if test -f "${f_bin_tgz}"; then - cp "${f_bin_tgz}" .. + if ls ${f_bin_tgz} &>/dev/null; then + cp ${f_bin_tgz} .. cd .. || exit for i in "${basename}"*-bin.tar.gz; do echo "$GPG_PASSPHRASE" | $GPG --passphrase-fd 0 --armour --output "$i.asc" --detach-sig "$i"