Setting the snapcraft.yaml version field to 'git' produces undocumented and broken magic
Bug #1769519 reported by
Neil McPhail
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I've found that if the version: field in snapcraft.yaml is set to 'git', snapcraft does some magic where a mangled form of `git describe` is substituted into the version: field. This seems like a superb feature, although it is missing from the documentation.
However, if the latest tag in the git repository contains invalid characters such as an underscore, the resultant snap will have an invalid version string and snap will refuse to install the package. Snapcraft itself does not produce an error.
I'd suggest this piece of magic is either fixed (perhaps substituting '-' characters for invalid characters) or removed.
(snapcraft version 2.42 on 16.04)
To post a comment you must log in.
Seems to be workaroundable by using the other undocumented version-script key?