Fix build determining current version

Only take the last line of the output. Current maven wrapper
will output the current directy, later versions of the wrapper
will output the wrapper version.
This commit is contained in:
Andreas Dangel
2017-05-05 12:22:55 +02:00
parent bbb6757e10
commit 39eb79f58e
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -ev
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -ev
RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
# Deploy to ossrh has already been done with the usual build. See build-push.sh