Skip to content

Commit

Permalink
release: allow to specify version with the "v" prefix
Browse files Browse the repository at this point in the history
The script currently fails if the version provided has the "v" prefix
(i.e., v3.6.0). Allow receiving the prefix and continue with the
process.

Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed Dec 4, 2024
1 parent 2b32307 commit 16cf5b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ help() {

main() {
VERSION=$1
if [[ ! "${VERSION}" =~ [0-9]+.[0-9]+.[0-9]+ ]]; then
if [[ ! "${VERSION}" =~ ^v?[0-9]+.[0-9]+.[0-9]+ ]]; then
log_error "Expected 'version' param of the form '<major-version>.<minor-version>.<patch-version>' but got '${VERSION}'"
exit 1
fi
RELEASE_VERSION="v${VERSION}"
RELEASE_VERSION="v${VERSION#v}"
MINOR_VERSION=$(echo "${VERSION}" | cut -d. -f 1-2)

if [ "${IN_PLACE}" == 1 ]; then
Expand Down

0 comments on commit 16cf5b6

Please sign in to comment.