From 8a2c696eb0e5f9268de03ee99d7cef0a5d0f50f2 Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Mon, 23 Jan 2023 19:55:13 -0600 Subject: [PATCH] allow bumping versions --- PREVIEW_NOTES.md | 5 +++-- mvn-defaults/pom.xml | 2 +- scripts/bump-minor-version | 12 ++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 scripts/bump-minor-version diff --git a/PREVIEW_NOTES.md b/PREVIEW_NOTES.md index 3a47c52d6..901b89d3a 100644 --- a/PREVIEW_NOTES.md +++ b/PREVIEW_NOTES.md @@ -1,4 +1,5 @@ -- 5facaddfe (HEAD -> prerelease-testing, origin/prerelease-testing) actions testing +- c19b2388e (HEAD -> main, origin/prerelease-testing, prerelease-testing) standardize on main/preview/release naming +- 5facaddfe (tag: 5.17.1-prerelease) actions testing - 33c55809d actions testing - fcdddf307 simplify version - ac7f5762c actions cleanup @@ -16,7 +17,7 @@ - 4eb07e046 do not run build when prerelease is already selected - 961f420de defer prerelease tagging until staging is complete - 08040f9ad actions testing -- 4b416ccf6 (main) use revision instead of version for module dependency +- 4b416ccf6 use revision instead of version for module dependency - e7959e5bb Merge branch 'main' of github.com:nosqlbench/nosqlbench - 362e3c6cd (origin/main) Merge pull request #942 from nosqlbench/nosqlbench-937 - 839e4d16b Merge pull request #943 from nosqlbench/nosqlbench-941-annotators diff --git a/mvn-defaults/pom.xml b/mvn-defaults/pom.xml index dac0edfea..8fd57806c 100644 --- a/mvn-defaults/pom.xml +++ b/mvn-defaults/pom.xml @@ -24,7 +24,7 @@ - 5.17.1-SNAPSHOT + 5.17.2-SNAPSHOT INFO diff --git a/scripts/bump-minor-version b/scripts/bump-minor-version new file mode 100755 index 000000000..ba3a3d8ed --- /dev/null +++ b/scripts/bump-minor-version @@ -0,0 +1,12 @@ +#!/bin/bash +cd mvn-defaults +set -x +CURRENT_VERSION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout) +RELEASE_VERSION=${CURRENT_VERSION%%-SNAPSHOT} +BASE_VERSION=$(echo "$RELEASE_VERSION" | cut -d'.' -f1-2) +MINOR_VERSION=$(echo "$RELEASE_VERSION" | cut -d'.' -f3) +NEXT_MINOR_VERSION=$(( $MINOR_VERSION + 1 )) +NEXT_SNAPSHOT="${BASE_VERSION}.${NEXT_MINOR_VERSION}-SNAPSHOT" +printf "next-snapshot: %s\n" "${NEXT_SNAPSHOT}" +mvn versions:set-property -DallowSnapshots -DnewVersion="${NEXT_SNAPSHOT}" -Dproperty=revision +