File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ GINKGO ?= $(GOBIN)/ginkgo
18
18
GO_MINOR_VERSION = $(shell $(GO ) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
19
19
GOVULN_MIN_VERSION = 17
20
20
GO_VERSION = 1.23
21
+ LDFLAGS = -ldflags "\
22
+ -X 'main.Version=$(shell git describe --tags --always) ' \
23
+ -X 'main.GitTag=$(shell git describe --tags --abbrev=0) ' \
24
+ -X 'main.BuildDate=$(shell date -u +% Y-% m-% dT% H:% M:% SZ) '"
21
25
22
26
default :
23
27
$(MAKE ) build
@@ -62,10 +66,10 @@ test-coverage: install-test-deps
62
66
go test -race -v -count=1 -coverprofile=coverage.out ./...
63
67
64
68
build :
65
- go build -o $(BIN ) ./cmd/gosec/
69
+ go build $( LDFLAGS ) -o $(BIN ) ./cmd/gosec/
66
70
67
71
build-race :
68
- go build -race -o $(BIN ) ./cmd/gosec/
72
+ go build -race $( LDFLAGS ) -o $(BIN ) ./cmd/gosec/
69
73
70
74
clean :
71
75
rm -rf build vendor dist coverage.out
You can’t perform that action at this time.
0 commit comments