use GIT_TAG to override Version
This commit is contained in:
parent
b5b7272603
commit
f59eca6724
@ -11,6 +11,8 @@ run \
|
|||||||
--mount=type=cache,id=gobuild,target=/root/.cache/go-build \
|
--mount=type=cache,id=gobuild,target=/root/.cache/go-build \
|
||||||
go mod download
|
go mod download
|
||||||
|
|
||||||
|
arg GIT_TAG
|
||||||
|
|
||||||
copy . ./
|
copy . ./
|
||||||
run \
|
run \
|
||||||
--mount=type=cache,id=gomod,target=/go/pkg/mod \
|
--mount=type=cache,id=gomod,target=/go/pkg/mod \
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -ex
|
set -ex
|
||||||
go build -o dist/ -trimpath -ldflags "-X main.Version=$(git describe --always --dirty)" $*
|
go build -o dist/ -trimpath -ldflags "-X main.Version=${GIT_TAG:-$(git describe --always --dirty)}" $*
|
||||||
|
Loading…
Reference in New Issue
Block a user