Append git source revision to snap version field when building
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
New
|
Undecided
|
Unassigned |
Bug Description
A very neat feature addition for the snap builds on launchpad would be an option in the snap build settings to add the git repository revision the snap is build from.
For example the snapcraft.yaml file comes with
version: 1.0-1
then the launchpad snap builder adds
version: 1.0-1~git4bc7f72
where the part after the the ~git prefix is the abbreviated commit object name you can get via git show --abbrev-commit for the current HEAD.
This allows us to identify clearly from what a snap is build from rather than having something build from something where a version number was set but the git repository already evolved and the version number wasn't updated because it wasn't released yet. Pretty useful for doing nightly development builds (together with the auto rebuild when the repository has changed).
The new option should be disabled by default.