Skip to content

Commit e0e7fc2

Browse files
committed
fix wrong build number in output file name
1 parent 28f5726 commit e0e7fc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gitversion.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ if [[ -n $JENKINS_SERVER_COOKIE ]]; then
2424
version=${GIT_COMMIT:0:7}
2525
buildnum=${BUILD_NUMBER}
2626
else
27-
if [[ -n $TRAVIS_BRANCH ]]; then
28-
branch=$TRAVIS_BRANCH
29-
buildnum=$TRAVIS_BUILD_NUMBER
27+
if [[ -n $GITHUB_RUN_NUMBER ]]; then
28+
branch=$(git rev-parse --abbrev-ref HEAD)
29+
buildnum=$GITHUB_RUN_NUMBER
3030
else
3131
branch=`git rev-parse --abbrev-ref HEAD`
3232
buildnum=man

0 commit comments

Comments
 (0)