Skip to content

Commit f111fa1

Browse files
committed
update makefile
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 0bdd1ca commit f111fa1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
PROJECT_NAME := kube-bootstrap-token-manager
1+
PROJECT_NAME := $(shell basename $(CURDIR))
22
GIT_TAG := $(shell git describe --dirty --tags --always)
33
GIT_COMMIT := $(shell git rev-parse --short HEAD)
44
LDFLAGS := -X "main.gitTag=$(GIT_TAG)" -X "main.gitCommit=$(GIT_COMMIT)" -linkmode external -extldflags "-static" -s -w
55

66
FIRST_GOPATH := $(firstword $(subst :, ,$(shell go env GOPATH)))
77
GOLANGCI_LINT_BIN := $(FIRST_GOPATH)/bin/golangci-lint
8+
GOSEC_BIN := $(FIRST_GOPATH)/bin/gosec
89

910
.PHONY: all
1011
all: build
@@ -38,6 +39,9 @@ test:
3839
dependencies:
3940
go mod vendor
4041

42+
.PHONY: check-release
43+
check-release: vendor lint gosec
44+
4145
.PHONY: lint
4246
lint: $(GOLANGCI_LINT_BIN)
4347
$(GOLANGCI_LINT_BIN) run -E exportloopref,gofmt --timeout=30m
@@ -50,4 +54,4 @@ $(GOLANGCI_LINT_BIN):
5054
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env 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

0 commit comments

Comments
 (0)