-
Notifications
You must be signed in to change notification settings - Fork 85
/
Makefile
29 lines (21 loc) · 812 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
BINARY_NAME=helm-wrapper
GOPATH = $(shell go env GOPATH)
LDFLAGS="-s -w"
build:
go build -ldflags ${LDFLAGS} -o bin/${BINARY_NAME}
# cross compilation
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags ${LDFLAGS} -o bin/${BINARY_NAME}
build-windows:
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags ${LDFLAGS} -o bin/${BINARY_NAME}
# build docker image
build-docker:
rm -rf bin/${BINARY_NAME}
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags ${LDFLAGS} -o bin/${BINARY_NAME}
docker build -t helm-wrapper:`git rev-parse --short HEAD` .
.PHONY: golangci-lint
golangci-lint: $(GOLANGCILINT)
@echo
$(GOPATH)/bin/golangci-lint run
$(GOLANGCILINT):
(cd /; GO111MODULE=on GOPROXY="direct" GOSUMDB=off go get github.com/golangci/golangci-lint/cmd/[email protected])