Skip to content

Commit bcb9a13

Browse files
committed
Exclude test poms and use mvn batch mode to unclutter logs
Signed-off-by: Kai Kreuzer <kai@openhab.org>
1 parent 34861fb commit bcb9a13

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ jobs:
4949
5050
- name: Update version to release version
5151
run: |
52-
mvn versions:set -DnewVersion=${{ github.event.inputs.release_version }}
53-
mvn versions:commit
52+
mvn -B versions:set -DnewVersion=${{ github.event.inputs.release_version }}
53+
mvn -B versions:commit
5454
5555
- name: Update parent POM versions in modules
5656
run: |
5757
# Update parent version in all child POMs
5858
for pom in $(find . -name pom.xml -not -path "*/target/*" -not -path "*/src/test/resources/*"); do
5959
if [ -f "$pom" ]; then
60-
mvn versions:update-parent -DparentVersion=${{ github.event.inputs.release_version }} -f "$pom"
61-
mvn versions:commit -f "$pom"
60+
mvn -B versions:update-parent -DparentVersion=${{ github.event.inputs.release_version }} -f "$pom"
61+
mvn -B versions:commit -f "$pom"
6262
fi
6363
done
6464
@@ -78,7 +78,7 @@ jobs:
7878
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
7979
run: |
8080
# Fail fast: If this step fails, no git operations will occur
81-
mvn -DskipTests=true -DskipChecks=true -DperformRelease=true clean deploy
81+
mvn -B -DskipTests=true -DskipChecks=true -DperformRelease=true clean deploy
8282
8383
- name: Trigger Central Publisher Portal Upload
8484
env:
@@ -136,19 +136,20 @@ jobs:
136136
# This step only runs after successful tag creation (fail-fast behavior)
137137
if: success()
138138
run: |
139-
mvn versions:set -DnewVersion=${{ github.event.inputs.next_snapshot_version }}
140-
mvn versions:commit
139+
mvn -B versions:set -DnewVersion=${{ github.event.inputs.next_snapshot_version }}
140+
mvn -B versions:commit
141141
142142
- name: Update parent POM versions in modules to snapshot
143143
# This step only runs after successful tag creation (fail-fast behavior)
144144
if: success()
145145
run: |
146146
# Update parent version in all child POMs
147147
# Find all pom.xml files except the root pom.xml
148-
for pom in $(find . -name pom.xml ! -path "./pom.xml"); do
148+
for pom in $(find . -name pom.xml ! -path "./pom.xml" -not -path "*/target/*" -not -path "*/src/test/resources/*"); do
149149
if [ -f "$pom" ]; then
150-
mvn versions:update-parent -DparentVersion=${{ github.event.inputs.next_snapshot_version }} -f "$pom"
151-
mvn versions:commit -f "$pom"
150+
echo "Updating parent version in $pom"
151+
mvn -B versions:update-parent -DparentVersion=${{ github.event.inputs.next_snapshot_version }} -f "$pom"
152+
mvn -B versions:commit -f "$pom"
152153
fi
153154
done
154155

0 commit comments

Comments
 (0)