diff --git a/.goreleaser.yml b/.goreleaser.yml index e39ab47..e9607d8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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: diff --git a/scripts/version.sh b/scripts/version.sh index f2dd284..a88442c 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -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')" $@