This allows the use of "git describe --tags" to recognize lightweight
version tags, and the removal of initial "v" in the hugo snap version.
See #10225
name: hugo
-version: git
issues: https://github.com/gohugoio/hugo/issues
source-code: https://github.com/gohugoio/hugo.git
website: https://gohugo.io/
base: core20
confinement: strict
grade: devel # "devel" or "stable"
+adopt-info: hugo
package-repositories:
- type: apt
after:
- git
- go
+ override-pull: |
+ snapcraftctl pull
+ snapcraftctl set-version "$(git describe --tags --always --match 'v[0-9]*' | sed 's/^v//; s/-/+git/; s/-g/./')"
override-build: |
echo "\nStarting override-build:"
set -ex