Strip "v" from git version

Bug #1882892 reported by Ryan Finnie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Won't Fix
Undecided
Unassigned

Bug Description

"version: git" produces a version from `git describe`, producing "v4.4.1+git17.ab595c2". git's recommended tag format is to prefix tag versions with "v". I know snap versions don't convey any meaning, but most developers don't consider the "v" to be part of the version number in their software. I also know you can use snapcraftctl set-version within override-pull, but that seems like a heavy solution, though I've found many examples doing that specifically to strip the v (e.g. https://github.com/snapcrafters/wethr/blob/master/snap/snapcraft.yaml).

Since it's a common use case, maybe strip the initial ^v by default, or maybe "version: git-numeric" or similar?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

version: git is somewhat deprecated, you can do "snapcraftctl set-version $(git describe ...)" to create your own custom logic on version presentation.

Changed in snapcraft:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.