diff options
author | 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com> | 2019-01-26 04:44:03 +0800 |
---|---|---|
committer | 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com> | 2019-01-26 04:44:03 +0800 |
commit | 044fd1413710143c9b714fe3b20db7ea95e5eb27 (patch) | |
tree | 1d8be1c3ba1adc43c4136a1a58bf34a9714b8336 /snap | |
parent | 42d1142c2d569ca6de85079da93809bc7fdf6a7a (diff) |
Implement custom snap version string generation
The snap version string generated by the `git` value of the `version`
key isn't mimicing the previous versioning style due to the prefixing
`v` in the git tag, this patch replace it with a custom implementation
based on the `version-script` key.
Note the `version` key is still required to exist due to schema
requirements, but has no effect when the `version-script` key is
defined.
Reference:
Snapcraft version scripts - snapcraft - snapcraft.io
https://forum.snapcraft.io/t/snapcraft-version-scripts/106
Signed-off-by: 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
Diffstat (limited to 'snap')
-rw-r--r-- | snap/snapcraft.yaml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index f137c1a5..7d0f618a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,6 @@ name: glances -version: git +version: set-by-version-script +version-script: git describe --always --dirty --tags --match 'v*' | sed s/^v// summary: Glances an Eye on your system. A top/htop alternative. description: | Glances is a cross-platform monitoring tool which aims to present |