From 49f1d5df7d5356555c0772d727971df021bea25e Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 4 Oct 2023 14:53:42 +0200 Subject: [PATCH] Add a check-version.sh script for releases --- README.md | 12 ++++++------ check-version.sh | 11 +++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100755 check-version.sh diff --git a/README.md b/README.md index 8ade69610e..3e5e33977c 100644 --- a/README.md +++ b/README.md @@ -220,10 +220,10 @@ Besides the mentioned about `artifact` and `skip` elements the following test co true true - + true - + true @@ -347,10 +347,10 @@ and the generated ones for every member. The reports can be found under the `tar ## Release steps -1. Use the Maven Release Plugin to tag and deploy to the Sonatype OSS Nexus: -> TAG=0.0.5 && ./mvnw release:prepare release:perform -DdevelopmentVersion=999-SNAPSHOT -DreleaseVersion=$TAG -Dtag=$TAG -DperformRelease -Prelease,releaseNexus -DskipTests -Darguments=-DskipTests +1. Use the Maven Release Plugin to tag and deploy to the Sonatype OSS Nexus: +> TAG=0.0.5 && ./check-version.sh $TAG && ./mvnw release:prepare release:perform -DdevelopmentVersion=999-SNAPSHOT -DreleaseVersion=$TAG -Dtag=$TAG -DperformRelease -Prelease,releaseNexus -DskipTests -Darguments=-DskipTests 2. The repository will be automatically closed and released, there's nothing else to do. - + --- **IMPORTANT** @@ -388,5 +388,5 @@ Due to the Apache process, it is possible that the Apache Camel artifacts may no camel-staging - + ``` diff --git a/check-version.sh b/check-version.sh new file mode 100755 index 0000000000..e871e0ae97 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +TAG=$1 +QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.version -q -DforceStdout) + +if [[ "${TAG}" != "${QUARKUS_VERSION}" ]]; then + echo "ERROR: Quarkus version in POM (${QUARKUS_VERSION}) is not the same as \$TAG (${TAG})" + exit 1 +fi + +exit 0