Skip to content

Commit f08a310

Browse files
authored
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>
1 parent 5aa8d3a commit f08a310

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

dev-support/create-release/do-release.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ export GPG_TTY=$(tty)
5757

5858
function should_build {
5959
local WHAT=$1
60-
[ -z "$RELEASE_STEP" ] || [ "$WHAT" = "$RELEASE_STEP" ]
60+
if [[ -z "$RELEASE_STEP" ]]; then
61+
return 0
62+
elif [[ "$RELEASE_STEP" == *"$WHAT"* ]]; then
63+
return 0
64+
else
65+
return 1
66+
fi
6167
}
6268

6369
if should_build "tag" && [ $SKIP_TAG = 0 ]; then

dev-support/create-release/release-util.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,15 @@ function get_release_info {
126126
parse_version)
127127
echo "Current branch VERSION is $VERSION."
128128

129-
if [[ ! $VERSION =~ .*-SNAPSHOT ]]; then
130-
error "Not a SNAPSHOT version: $VERSION"
131-
fi
132-
133129
NEXT_VERSION="$VERSION"
134-
RELEASE_VERSION="${VERSION/-SNAPSHOT/}"
130+
RELEASE_VERSION=""
135131
SHORT_VERSION=$(echo "$VERSION" | cut -d . -f 1-2)
132+
if [[ ! $VERSION =~ .*-SNAPSHOT ]]; then
133+
RELEASE_VERSION="$VERSION"
134+
else
135+
RELEASE_VERSION="${VERSION/-SNAPSHOT/}"
136+
fi
137+
136138
local REV=$(echo "$VERSION" | cut -d . -f 3)
137139

138140
# Find out what RC is being prepared.

0 commit comments

Comments
 (0)