HBASE-23118 [RELEASE SCRIPTS] Allow creating a RC from an existing tag[RELEASE SCRIPTS] Allow creating a RC from an existing tag (#686)

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Duo Zhang 2019-10-04 13:39:27 +08:00 committed by GitHub
parent 5aa8d3a20b
commit f08a310ed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -57,7 +57,13 @@ export GPG_TTY=$(tty)
function should_build {
local WHAT=$1
[ -z "$RELEASE_STEP" ] || [ "$WHAT" = "$RELEASE_STEP" ]
if [[ -z "$RELEASE_STEP" ]]; then
return 0
elif [[ "$RELEASE_STEP" == *"$WHAT"* ]]; then
return 0
else
return 1
fi
}
if should_build "tag" && [ $SKIP_TAG = 0 ]; then

View File

@ -126,13 +126,15 @@ function get_release_info {
parse_version)
echo "Current branch VERSION is $VERSION."
if [[ ! $VERSION =~ .*-SNAPSHOT ]]; then
error "Not a SNAPSHOT version: $VERSION"
NEXT_VERSION="$VERSION"
RELEASE_VERSION=""
SHORT_VERSION=$(echo "$VERSION" | cut -d . -f 1-2)
if [[ ! $VERSION =~ .*-SNAPSHOT ]]; then
RELEASE_VERSION="$VERSION"
else
RELEASE_VERSION="${VERSION/-SNAPSHOT/}"
fi
NEXT_VERSION="$VERSION"
RELEASE_VERSION="${VERSION/-SNAPSHOT/}"
SHORT_VERSION=$(echo "$VERSION" | cut -d . -f 1-2)
local REV=$(echo "$VERSION" | cut -d . -f 3)
# Find out what RC is being prepared.