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:
parent
e972cc4537
commit
998976c5cc
|
@ -38,7 +38,6 @@ timeout(90) {
|
|||
checkout scm
|
||||
|
||||
version = readFile("${env.WORKSPACE}/VERSION").trim()
|
||||
sh 'echo "' + version + '" > .version'
|
||||
|
||||
sh 'git fetch --tags'
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue