Skip to content

Commit fa96880

Browse files
committed
set version
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent f11f239 commit fa96880

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scripts/set-version.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [ $# -ne 1 ]; then
6+
echo "Usage: $0 <newVersion>"
7+
exit 1
8+
fi
9+
newVersion=$1
10+
11+
# for each module into aggregator pom
12+
grep "\<module\>" pom.xml | sed 's/<\/module>//g' | sed 's/.*<module>//g' | sed 's/.*\///g' | while IFS= read -r module
13+
do
14+
# set the version of the module
15+
# and update reference to this module into others modules
16+
mvn versions:set -DgenerateBackupPoms=false -DartifactId="$module" \
17+
-DnewVersion="$newVersion" -DupdateMatchingVersions=true
18+
done
19+
# set the version of the aggregator pom
20+
mvn versions:set -DnewVersion="$newVersion" -DgenerateBackupPoms=false

0 commit comments

Comments
 (0)