forked from salesforce/generic-sidecar-injector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
19 lines (13 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
all: fmt build test install
fmt:
go fmt ./...
build:
go build -mod=vendor -ldflags "-X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=$(git rev-parse --short HEAD)' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=$(git tag | tail -1)'" ./cmd/...
test:
go test -mod=vendor -ldflags "-X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=$(git rev-parse --short HEAD)' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=$(git tag | tail -1)'" -cover ./...
install:
go install -mod=vendor -ldflags "-X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=$(git rev-parse --short HEAD)' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=$(git tag | tail -1)'" ./cmd/...
linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -mod=vendor -ldflags "-s" -installsuffix cgo -v ./cmd/...
docker:
docker build . -t sidecarinjector