Last active
October 26, 2022 11:38
-
-
Save corneil/841cee3bc01c9da855df38fd585534b6 to your computer and use it in GitHub Desktop.
Shell script to extract Maven project version for use in CI tools.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
VERSIONS=$($SCDIR/mvnw exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive -q | sed 's/\"//g' | sed 's/version=//g') | |
for v in $VERSIONS; do | |
VERSION=$v | |
done | |
echo "$VERSION" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment