Skip to content

Commit 993267e

Browse files
fix(CI): strip whitespace from file read (#119)
1 parent 8c71ef3 commit 993267e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ parallel(
6666
sh 'mkdir -p tmp'
6767
sh 'git describe --all --exact-match > tmp/GIT_BRANCH'
6868
sh 'git tag -l --contains HEAD > tmp/GIT_TAG'
69-
def git_branch = readFile('tmp/GIT_BRANCH')
70-
def git_tag = readFile('tmp/GIT_TAG')
69+
def git_branch = readFile('tmp/GIT_BRANCH').trim()
70+
def git_tag = readFile('tmp/GIT_TAG').trim()
7171

7272
if (git_branch != "remotes/origin/master" && git_tag == "") {
7373
echo "Skipping build of 386 binaries to shorten CI for Pull Requests"
@@ -92,7 +92,7 @@ parallel(
9292
// HACK: Recommended approach for getting command output is writing to and then reading a file.
9393
sh 'mkdir -p tmp'
9494
sh 'git describe --all --exact-match > tmp/GIT_BRANCH'
95-
def git_branch = readFile('tmp/GIT_BRANCH')
95+
def git_branch = readFile('tmp/GIT_BRANCH').trim()
9696

9797
if (git_branch == "remotes/origin/master") {
9898
sh 'make bootstrap'

0 commit comments

Comments
 (0)