1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 09:00:10 +00:00

apt: Use commit count to fix version comparisons

previous fix only worked because the numerical portion of the commit
hash happened to be greater. This should do properly fix it.
This commit is contained in:
Harvey Tindall 2021-05-31 22:11:43 +01:00
parent 555d5abf59
commit d7ab01063a
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ archives:
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "0{{.ShortCommit}}"
name_template: "0.0.0-{{ .Env.JFA_GO_NFPM_EPOCH }}"
changelog:
sort: asc
filters:

View File

@ -2,4 +2,4 @@
# sets version environment variable for goreleaser to use
# scripts/version.sh goreleaser ...
JFA_GO_VERSION=$(git describe --exact-match HEAD 2> /dev/null || echo 'vgit')
JFA_GO_VERSION="$(echo $JFA_GO_VERSION | sed 's/v//g')" $@
JFA_GO_NFPM_EPOCH=$(git rev-list --all --count) JFA_GO_VERSION="$(echo $JFA_GO_VERSION | sed 's/v//g')" $@