Skip to content

Commit

Permalink
use improved versioning (google#6691)
Browse files Browse the repository at this point in the history
  • Loading branch information
om26er authored Jun 11, 2021
1 parent 337eb8b commit a9fb540
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ parts:
snapcraftctl pull
tag=$(git describe --tags --abbrev=0)
count=$(git rev-list $tag.. --count)
hash=$(git rev-parse --short HEAD)
snapcraftctl set-version $tag+git$count.$hash
if [ "$count" = 0 ];
then
version=$tag
else
hash=$(git rev-parse --short HEAD)
version=$tag+git$count.$hash
fi
snapcraftctl set-version $version
apps:
Expand Down

0 comments on commit a9fb540

Please sign in to comment.