Grep only for lines starting with version

This commit is contained in:
Adubbz 2019-05-04 15:41:27 +10:00
parent 61cfaca544
commit 9f528f4440
1 changed files with 1 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -25,7 +25,7 @@ pipeline {
steps { steps {
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies' sh './gradlew ${GRADLE_ARGS} --refresh-dependencies'
script { script {
env.MYVERSION = sh(returnStdout: true, script: './gradlew :properties -q | grep "version:" | awk \'{print $2}\'').trim() env.MYVERSION = sh(returnStdout: true, script: './gradlew :properties -q | grep "^version:" | awk \'{print $2}\'').trim()
} }
} }
} }