Skip to content

Commit

Permalink
chore: fix SNAPSHOT version
Browse files Browse the repository at this point in the history
  • Loading branch information
algomaster99 committed Aug 22, 2023
1 parent 897d9bb commit 6c1a09d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: 'oracle'

- name: Download next-semver
run: wget https://repo1.maven.org/maven2/io/github/algomaster99/semver/1.0.2/semver-1.0.2-jar-with-dependencies.jar
run: wget https://repo1.maven.org/maven2/io/github/algomaster99/semver/1.0.3/semver-1.0.3-jar-with-dependencies.jar
# Get current version from pom and remove snapshot if present.
- name: Get current version from pom and remove snapshot if present
run: echo "CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')" >> $GITHUB_ENV
Expand All @@ -42,11 +42,11 @@ jobs:
# As we are using a snapshot version, we need to run semver next twice to get the next version for mahor and minor releases. Reason: Any X.Y.Z-SNAPSHOT version will be released as X.Y.Z if we run semver next major X.Y.Z-SNAPSHOT
- name: Set next version
if: ${{ github.event.inputs.version == 'patch' }}
run: echo "NEXT_VERSION=$(java -jar semver-1.0.2-jar-with-dependencies.jar --release-type=${{ github.event.inputs.version }} $CURRENT_VERSION_WITH_SNAPSHOT)" >> $GITHUB_ENV
run: echo "NEXT_VERSION=$(java -jar semver-1.0.3-jar-with-dependencies.jar --release-type=${{ github.event.inputs.version }} $CURRENT_VERSION_WITH_SNAPSHOT)" >> $GITHUB_ENV
- name: Set next version
# semver next for a snapshot only releases the snapshot version, so we need to run it 2 times
if: ${{ github.event.inputs.version == 'major' || github.event.inputs.version == 'minor' }}
run: echo "NEXT_VERSION=$(java -jar semver-1.0.2-jar-with-dependencies.jar --release-type=${{ github.event.inputs.version }} $CURRENT_VERSION)" >> $GITHUB_ENV
run: echo "NEXT_VERSION=$(java -jar semver-1.0.3-jar-with-dependencies.jar --release-type=${{ github.event.inputs.version }} $CURRENT_VERSION)" >> $GITHUB_ENV
- name: Set release version
run: mvn --no-transfer-progress --batch-mode versions:set -DnewVersion=$NEXT_VERSION -DprocessAllModules -DgenerateBackupPoms=false
- name: Commit & Push changes
Expand Down Expand Up @@ -85,8 +85,8 @@ jobs:
# Time to set the next version: The next version of any Release is a snapshot version of the next patch version
- name : Set next version (patch of release version) with -SNAPSHOT suffix
run: |
echo "NEXT_RELEASE_VERSION=$(java -jar semver-1.0.2-jar-with-dependencies.jar --release-type=patch $NEXT_VERSION)-SNAPSHOT" >> $GITHUB_ENV
echo "NEXT_RELEASE_VERSION_WITHOUT_SNAPSHOT=$(java -jar semver-1.0.2-jar-with-dependencies.jar --release-type=patch $NEXT_VERSION)" >> $GITHUB_ENV
echo "NEXT_RELEASE_VERSION=$(java -jar semver-1.0.3-jar-with-dependencies.jar --release-type=patch $NEXT_VERSION)-SNAPSHOT" >> $GITHUB_ENV
echo "NEXT_RELEASE_VERSION_WITHOUT_SNAPSHOT=$(java -jar semver-1.0.3-jar-with-dependencies.jar --release-type=patch $NEXT_VERSION)" >> $GITHUB_ENV
- name: Set release version
run: mvn --no-transfer-progress --batch-mode versions:set -DnewVersion=$NEXT_RELEASE_VERSION -DprocessAllModules -DgenerateBackupPoms=false

Expand Down
2 changes: 1 addition & 1 deletion classfile-fingerprint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.algomaster99</groupId>
<artifactId>terminator</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.10.1-SNAPSHOT</version>
</parent>
<artifactId>classfile-fingerprint</artifactId>
<packaging>maven-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.algomaster99</groupId>
<artifactId>terminator</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.10.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Terminator</name>
Expand Down
2 changes: 1 addition & 1 deletion terminator-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.algomaster99</groupId>
<artifactId>terminator</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.10.1-SNAPSHOT</version>
</parent>
<artifactId>terminator-commons</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion watchdog-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.algomaster99</groupId>
<artifactId>terminator</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.10.1-SNAPSHOT</version>
</parent>
<artifactId>watchdog-agent</artifactId>
<packaging>jar</packaging>
Expand Down

0 comments on commit 6c1a09d

Please sign in to comment.