File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1- PROJECT_NAME := azure-devops-exporter
1+ PROJECT_NAME := $( shell basename $( CURDIR ) )
22GIT_TAG := $(shell git describe --dirty --tags --always)
33GIT_COMMIT := $(shell git rev-parse --short HEAD)
4- LDFLAGS := -X "main.gitTag=$(GIT_TAG ) " -X "main.gitCommit=$(GIT_COMMIT ) " -extldflags "-static"
4+ LDFLAGS := -X "main.gitTag=$(GIT_TAG ) " -X "main.gitCommit=$(GIT_COMMIT ) " -linkmode external - extldflags "-static" -s -w
55
66FIRST_GOPATH := $(firstword $(subst :, ,$(shell go env GOPATH) ) )
77GOLANGCI_LINT_BIN := $(FIRST_GOPATH ) /bin/golangci-lint
8+ GOSEC_BIN := $(FIRST_GOPATH ) /bin/gosec
89
910.PHONY : all
1011all : build
3839dependencies :
3940 go mod vendor
4041
42+ .PHONY : check-release
43+ check-release : vendor lint gosec test
44+
4145.PHONY : lint
4246lint : $(GOLANGCI_LINT_BIN )
4347 $(GOLANGCI_LINT_BIN ) run -E exportloopref,gofmt --timeout=30m
@@ -47,7 +51,7 @@ gosec: $(GOSEC_BIN)
4751 $(GOSEC_BIN ) ./...
4852
4953$(GOLANGCI_LINT_BIN ) :
50- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH ) /bin
54+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(FIRST_GOPATH ) /bin
5155
5256$(GOSEC_BIN ) :
53- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(FIRST_GOPATH ) /bin v2.7.0
57+ curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(FIRST_GOPATH ) /bin
You can’t perform that action at this time.
0 commit comments