forked from phoedos/pmd
Use xmlint to get the pom version
This commit is contained in:
@ -55,5 +55,5 @@ function travis_isWindows() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_pom_version() {
|
function get_pom_version() {
|
||||||
echo $(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.0.0:exec)
|
echo $(echo -e 'setns x=http://maven.apache.org/POM/4.0.0\ncat /x:project/x:version/text()' | xmllint --shell pom.xml | grep -v /)
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ echo "Releasing PMD"
|
|||||||
echo "-------------------------------------------"
|
echo "-------------------------------------------"
|
||||||
|
|
||||||
# see also https://gist.github.com/pdunnavant/4743895
|
# see also https://gist.github.com/pdunnavant/4743895
|
||||||
CURRENT_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.0.0:exec)
|
CURRENT_VERSION=$(echo -e 'setns x=http://maven.apache.org/POM/4.0.0\ncat /x:project/x:version/text()' | xmllint --shell pom.xml | grep -v /)
|
||||||
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
|
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
|
||||||
MAJOR=$(echo $RELEASE_VERSION | cut -d . -f 1)
|
MAJOR=$(echo $RELEASE_VERSION | cut -d . -f 1)
|
||||||
MINOR=$(echo $RELEASE_VERSION | cut -d . -f 2)
|
MINOR=$(echo $RELEASE_VERSION | cut -d . -f 2)
|
||||||
|
Reference in New Issue
Block a user