Skip to content

Commit

Permalink
HBASE-23118 [RELEASE SCRIPTS] Allow creating a RC from an existing ta…
Browse files Browse the repository at this point in the history
…g[RELEASE SCRIPTS] Allow creating a RC from an existing tag (#686)

Signed-off-by: stack <[email protected]>
  • Loading branch information
Apache9 authored Oct 4, 2019
1 parent 5aa8d3a commit f08a310
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 7 additions & 1 deletion dev-support/create-release/do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions dev-support/create-release/release-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
fi

NEXT_VERSION="$VERSION"
RELEASE_VERSION="${VERSION/-SNAPSHOT/}"
RELEASE_VERSION=""
SHORT_VERSION=$(echo "$VERSION" | cut -d . -f 1-2)
if [[ ! $VERSION =~ .*-SNAPSHOT ]]; then
RELEASE_VERSION="$VERSION"
else
RELEASE_VERSION="${VERSION/-SNAPSHOT/}"
fi

local REV=$(echo "$VERSION" | cut -d . -f 3)

# Find out what RC is being prepared.
Expand Down

0 comments on commit f08a310

Please sign in to comment.