forked from rancher/helm-unittest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (45 loc) · 1.46 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PLUGIN_NAME := snapshot
.PHONY: build
build: build_linux build_mac build_windows
build_windows: export GOARCH=amd64
build_windows: export GO111MODULE=on
build_windows: export GOPROXY=https://goproxy.io
build_windows:
@GOOS=windows go build -v --ldflags="-w -X main.version=$(VERSION)" \
-o bin/windows/amd64/snapshot main.go # windows
link_windows:
@cp bin/windows/amd64/snapshot ./bin/snapshot
build_linux: export GOARCH=amd64
build_linux: export CGO_ENABLED=0
build_linux: export GO111MODULE=on
build_linux: export GOPROXY=https://goproxy.io
build_linux:
@GOOS=linux go build -v --ldflags="-w -X main.version=$(VERSION)" \
-o bin/linux/amd64/snapshot main.go # linux
link_linux:
@cp bin/linux/amd64/snapshot ./bin/snapshot
build_mac: export GOARCH=amd64
build_mac: export CGO_ENABLED=0
build_mac: export GO111MODULE=on
build_mac: export GOPROXY=https://goproxy.io
build_mac:
@GOOS=darwin go build -v --ldflags="-w -X main.version=$(VERSION)" \
-o bin/darwin/amd64/snapshot main.go # mac osx
@cp bin/darwin/amd64/snapshot ./bin/snapshot # For use w make install
link_mac:
@cp bin/darwin/amd64/snapshot ./bin/snapshot
.PHONY: clean
clean:
@git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf
.PHONY: covhtml
covhtml:
@go tool cover -html=.cover/cover.out
.PHONY: tree
tree:
@tree -I vendor
.PHONY: install
install:
HELM_PUSH_PLUGIN_NO_INSTALL_HOOK=1 helm plugin install $(shell pwd)
.PHONY: remove
remove:
helm plugin remove $(PLUGIN_NAME)