nosqlbench/scripts/bump-minor-version
2023-01-23 19:55:13 -06:00

13 lines
524 B
Bash
Executable File

#!/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