From d0f86fe8683855f839acd2eaf7884a06c277024a Mon Sep 17 00:00:00 2001 From: Greg Turnquist Date: Tue, 19 May 2020 10:46:26 -0500 Subject: [PATCH] #1101 - Adapt new-issue-branch to handle calver and old versioning. Original pull request: #1102. --- etc/scripts/new-issue-branch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/scripts/new-issue-branch b/etc/scripts/new-issue-branch index 8aa2c411..ff0e94be 100755 --- a/etc/scripts/new-issue-branch +++ b/etc/scripts/new-issue-branch @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # # This script creates a new local issue branch for the given issue id. # Previous changes are stashed before the issue branch is created and are reapplied after branch creation. @@ -24,7 +24,7 @@ OLD_VERSION_TMP=$(mvn -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evalua OLD_POM_VERSION=${OLD_VERSION_TMP:?"Could not extract current project version from pom.xml"} # Replaces BUILD in BUILD-SNAPSHOT with the given TICKET_ID -NEW_POM_VERSION=${OLD_POM_VERSION/"BUILD"/$TICKET_ID} +NEW_POM_VERSION=${OLD_POM_VERSION/"-SNAPSHOT"/"-${TICKET_ID}-SNAPSHOT"} ISSUE_BRANCH="issue/$TICKET_ID" echo "Creating feature branch $TICKET_ID: $OLD_POM_VERSION -> $NEW_POM_VERSION"