Merge pull request 'Fix using branch for version number' (#209) from issue/205 into master
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
All checks were successful
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Reviewed-on: #209
This commit is contained in:
commit
8cb2c6b2cd
1 changed files with 3 additions and 6 deletions
|
@ -24,13 +24,10 @@ PR=${PR:-}
|
||||||
if [ -n "$PR" ]; then
|
if [ -n "$PR" ]; then
|
||||||
title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')"
|
title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')"
|
||||||
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')"
|
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')"
|
||||||
|
elif [ -f ".git/branch"]; then
|
||||||
|
ref=$(cat .git/branch)-$(git rev-parse --short $ref)
|
||||||
else
|
else
|
||||||
ref=$(cat .git/ref || echo "HEAD")
|
ref=$(git rev-parse --short "$(cat .git/ref || echo "HEAD")")
|
||||||
branch=$(git rev-parse --abbrev-ref $ref)
|
|
||||||
if [ -z "$branch" ]; then
|
|
||||||
branch=$(cat .git/ref)
|
|
||||||
fi
|
|
||||||
ref=${branch}-$(git rev-parse --short $ref)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
title "Version: '$ref'"
|
title "Version: '$ref'"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue