Skip to content

Commit

Permalink
Add a check-version.sh script for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Oct 4, 2023
1 parent 3061d10 commit 49f1d5d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ Besides the mentioned about `artifact` and `skip` elements the following test co
<skipNative>true</skipNative>
<!-- skip JVM test runs but do run the native test -->
<skipJvm>true</skipJvm>

<!-- while skipping means adding `maven.test.skip` property to the config, excluding means removing the test module for the artifact -->
<excluded>true</excluded>

<!-- use the failsafe plugin instead of the surefire one (which is the default) for the test-->
<mavenFailsafePlugin>true</mavenFailsafePlugin>

Expand Down Expand Up @@ -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**

Expand Down Expand Up @@ -388,5 +388,5 @@ Due to the Apache process, it is possible that the Apache Camel artifacts may no
</profiles>
<activeProfiles>
<activeProfile>camel-staging</activeProfile>
</activeProfiles>
</activeProfiles>
```
11 changes: 11 additions & 0 deletions check-version.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 49f1d5d

Please sign in to comment.