mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
snap: Use "snapcraftctl set-version"
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
This commit is contained in:
parent
7b49c56a6a
commit
e0ba1a805a
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,4 @@
|
||||||
name: hugo
|
name: hugo
|
||||||
version: git
|
|
||||||
issues: https://github.com/gohugoio/hugo/issues
|
issues: https://github.com/gohugoio/hugo/issues
|
||||||
source-code: https://github.com/gohugoio/hugo.git
|
source-code: https://github.com/gohugoio/hugo.git
|
||||||
website: https://gohugo.io/
|
website: https://gohugo.io/
|
||||||
|
@ -12,6 +11,7 @@ license: "Apache-2.0"
|
||||||
base: core20
|
base: core20
|
||||||
confinement: strict
|
confinement: strict
|
||||||
grade: devel # "devel" or "stable"
|
grade: devel # "devel" or "stable"
|
||||||
|
adopt-info: hugo
|
||||||
|
|
||||||
package-repositories:
|
package-repositories:
|
||||||
- type: apt
|
- type: apt
|
||||||
|
@ -77,6 +77,9 @@ parts:
|
||||||
after:
|
after:
|
||||||
- git
|
- git
|
||||||
- go
|
- 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: |
|
override-build: |
|
||||||
echo "\nStarting override-build:"
|
echo "\nStarting override-build:"
|
||||||
set -ex
|
set -ex
|
||||||
|
|
Loading…
Reference in a new issue