properly set version
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
dd1569a8da
commit
31b3d07dcf
1 changed files with 2 additions and 2 deletions
|
|
@ -11,11 +11,11 @@ USER_ID=${USER_ID:-$UID}
|
||||||
USER_GROUP=${USER_GROUP:-$(id -g)}
|
USER_GROUP=${USER_GROUP:-$(id -g)}
|
||||||
|
|
||||||
cd $GARM_SOURCE/cmd/garm
|
cd $GARM_SOURCE/cmd/garm
|
||||||
go build -mod vendor -o $BIN_DIR/garm -tags osusergo,netgo,sqlite_omit_load_extension -ldflags "-linkmode external -extldflags '-static' -s -w -X main.Version=$(git describe --always --dirty)" .
|
go build -mod vendor -o $BIN_DIR/garm -tags osusergo,netgo,sqlite_omit_load_extension -ldflags "-linkmode external -extldflags '-static' -s -w -X main.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .
|
||||||
# GOOS=windows CC=x86_64-w64-mingw32-cc go build -mod vendor -o $BIN_DIR/garm.exe -tags osusergo,netgo,sqlite_omit_load_extension -ldflags "-s -w -X main.Version=$(git describe --always --dirty)" .
|
# GOOS=windows CC=x86_64-w64-mingw32-cc go build -mod vendor -o $BIN_DIR/garm.exe -tags osusergo,netgo,sqlite_omit_load_extension -ldflags "-s -w -X main.Version=$(git describe --always --dirty)" .
|
||||||
|
|
||||||
cd $GARM_SOURCE/cmd/garm-cli
|
cd $GARM_SOURCE/cmd/garm-cli
|
||||||
go build -mod vendor -o $BIN_DIR/garm-cli -tags osusergo,netgo -ldflags "-linkmode external -extldflags '-static' -s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --always --dirty)" .
|
go build -mod vendor -o $BIN_DIR/garm-cli -tags osusergo,netgo -ldflags "-linkmode external -extldflags '-static' -s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .
|
||||||
# GOOS=windows CGO_ENABLED=0 go build -mod vendor -o $BIN_DIR/garm-cli.exe -ldflags "-s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --always --dirty)" .
|
# GOOS=windows CGO_ENABLED=0 go build -mod vendor -o $BIN_DIR/garm-cli.exe -ldflags "-s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --always --dirty)" .
|
||||||
|
|
||||||
chown $USER_ID:$USER_GROUP -R "$BIN_DIR"
|
chown $USER_ID:$USER_GROUP -R "$BIN_DIR"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue