Skip to content

Commit

Permalink
add proper version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidsunset committed Nov 8, 2024
1 parent bb736ca commit c6d08c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions ci/mvn-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

CURRENT_VERSION=`xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' pom.xml`

if [[ $CURRENT_VERSION == *-6.2 ]]; then
NEW_VERSION=${CURRENT_VERSION%'-6.2'}
if [[ $CURRENT_VERSION == *-6.2-SNAPSHOT ]]; then
NEW_VERSION=${CURRENT_VERSION%'-6.2-SNAPSHOT'}
NEXT_VERSION=`bash ci/semver.sh -p $NEW_VERSION`
NEXT_SNAPSHOT="$NEXT_VERSION-6.2"
NEXT_SNAPSHOT="$NEXT_VERSION-6.2-SNAPSHOT"
NEW_VERSION="$NEW_VERSION-6.2"
echo "perform release of $NEW_VERSION from $CURRENT_VERSION and set next develop version $NEXT_SNAPSHOT"

mvn versions:set -DnewVersion=$NEW_VERSION versions:commit --no-transfer-progress
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.namics.oss.magnolia</groupId>
<artifactId>magnolia-flexible-image-generator</artifactId>
<version>0.0.11</version>
<version>0.0.12-6.2-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down

0 comments on commit c6d08c0

Please sign in to comment.