1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-14 14:20:11 +00:00
jfa-go/scripts/version.sh
Harvey Tindall d7ab01063a
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.
2021-05-31 22:11:43 +01:00

6 lines
291 B
Bash
Executable File

#!/bin/bash
# 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_NFPM_EPOCH=$(git rev-list --all --count) JFA_GO_VERSION="$(echo $JFA_GO_VERSION | sed 's/v//g')" $@