Skip to content

Commit d9bdc14

Browse files
committed
Update of deploy_snapshot.sh to obtain version using echo.
1 parent 8f1395f commit d9bdc14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.travis/deploy_snapshot.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
set -ev
33

44
DATE=`date +%Y%m%d%H%M`
5-
OLD_VERSION=`mvn -q org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -DforceStdout -Dexpression=project.version`
5+
#using this solution to get version into variable: https://stackoverflow.com/a/26514030/1470603
6+
OLD_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
67
VERSION=`sed "s/-SNAPSHOT/-${DATE}-SNAPSHOT/g" <<<"${OLD_VERSION}"`
78

89
echo "Changing snapshot version, OLD: ${OLD_VERSION} NEW: ${VERSION}"

0 commit comments

Comments
 (0)