2019-08-02 19:15:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
export GIT_COMMIT=$(git rev-parse --short HEAD)
|
2020-01-24 15:40:14 +00:00
|
|
|
export GIT_COMMIT_YEAR=$(git show -s --format=%cd --date=format:%Y HEAD)
|
2019-08-02 19:15:59 +00:00
|
|
|
export GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
|
|
|
|
export GIT_IMPORT=github.com/hashicorp/consul/version
|
2020-07-14 19:17:45 +00:00
|
|
|
export GOLDFLAGS="-X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}${GIT_DIRTY}
|