Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cxjava committed Apr 20, 2020
1 parent b6b5063 commit 43acf07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
gitTagExists=$(git tag --points-at HEAD)
if ! [ -n "$gitTagExists" ]; then
echo "no tag, create one."
latesttag=$(git describe --tags)
latesttag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "latest tag: ${latesttag}"
newtag=$(echo ${latesttag} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')
echo "new tag: ${newtag}"
Expand Down

0 comments on commit 43acf07

Please sign in to comment.