forked from kairen/kubectl-config-merge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 608 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 608 Bytes
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
VERSION_MAJOR ?= 0
VERSION_MINOR ?= 1
VERSION_BUILD ?= 0
VERSION ?= v$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_BUILD)
ORG := github.com
OWNER := kubedev
REPOPATH ?= $(ORG)/$(OWNER)/kubectl-config-merge
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
$(shell mkdir -p ./out)
.PHONY: build
build: out/config-merge-$(GOOS)-$(GOARCH)
out/config-merge-%-$(GOARCH):
CGO_ENABLED=0 GOOS=$* GOARCH=$(GOARCH) go build \
-ldflags="-s -w -X $(REPOPATH)/pkg/version.version=$(VERSION)" \
-a -o $@ cmd/kubectl-config-merge.go
.PHONY: dep
dep:
dep ensure
.PHONY: clean
clean:
rm -rf out/