Skip to content

Commit

Permalink
Merge pull request #133 from gabriel-samfira/fix-garm-cli-version
Browse files Browse the repository at this point in the history
Properly set garm-cli version
  • Loading branch information
gabriel-samfira authored Jul 16, 2023
2 parents 824a1ef + 2076581 commit fbee4d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/build-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ cd $GARM_SOURCE/cmd/garm-cli
go build -mod vendor \
-o $BIN_DIR/amd64/garm-cli \
-tags osusergo,netgo,sqlite_omit_load_extension \
-ldflags "-linkmode external -extldflags '-static' -s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .
-ldflags "-linkmode external -extldflags '-static' -s -w -X github.com/cloudbase/garm/cmd/garm-cli/cmd.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .
CC=aarch64-linux-musl-gcc GOARCH=arm64 go build -mod vendor \
-o $BIN_DIR/arm64/garm-cli \
-tags osusergo,netgo,sqlite_omit_load_extension \
-ldflags "-linkmode external -extldflags '-static' -s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .
-ldflags "-linkmode external -extldflags '-static' -s -w -X github.com/cloudbase/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/amd64/garm-cli.exe \
# -tags osusergo,netgo,sqlite_omit_load_extension \
# -ldflags "-s -w -X garm/cmd/garm-cli/cmd.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .
# -ldflags "-s -w -X github.com/cloudbase/garm/cmd/garm-cli/cmd.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" .

chown $USER_ID:$USER_GROUP -R "$BIN_DIR"

0 comments on commit fbee4d4

Please sign in to comment.