Read version from the VERSION file.

Remove unnecessary `echo` to `.version` if we already have `VERSION` in the root folder.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Igor Mandrigin 2018-05-28 12:06:58 +02:00
parent e972cc4537
commit 998976c5cc
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
2 changed files with 1 additions and 2 deletions

View File

@ -38,7 +38,6 @@ timeout(90) {
checkout scm
version = readFile("${env.WORKSPACE}/VERSION").trim()
sh 'echo "' + version + '" > .version'
sh 'git fetch --tags'

View File

@ -22,7 +22,7 @@
(System/exit 1))))
(defmacro git-short-version []
(let [version-file-path ".version"
(let [version-file-path "VERSION"
version-file (io/file version-file-path)]
(if (.exists version-file)
(string/trim (slurp version-file-path))