With the old version of snapcraft (before switching to multipass), I used to have in my .yaml this :
version: git
This would take the git commit/tag of the first app and use it for the snap package version
I did not find anything in the doc and the forum, is there an easy way to have the version being the git commit/tag of one of the part/app with the current snapcraft ?
Isn’t version-script deprecated? I thought that the “new” way to do this was with snapcraftctl set-version? (I could be misremembering this of course)
Oh, well in that case, you could certainly use snapcraftctl set-version in an override-build or override-pull. Also, plenty of examples in snapcrafters repos
You can have a look at evince as an example and notice how they use version: git at the top but also put source-version: git in the parts (where necessary). Perhaps you’re missing the source-version bit?
That would be great !
I’m sorry I failed to find the source-version in you rexample and source-version:git in a part does not seem to work in my setup (snapcraft telling me source-version was unexpected.