-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (33 loc) · 1.11 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
VERSION=0.1.0
REVISION := $(shell git rev-parse --short HEAD;)
CLI_EXE=chart-scanner
CLI_PKG=github.com/chartmuseum/chart-scanner/cmd/chart-scanner
.PHONY: build
build: build-linux build-mac build-windows
build-windows:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -v \
--ldflags="-w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)" \
-o bin/windows/amd64/$(CLI_EXE) $(CLI_PKG) # windows
build-linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v \
--ldflags="-w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)" \
-o bin/linux/amd64/$(CLI_EXE) $(CLI_PKG) # linux
build-mac:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -v \
--ldflags="-w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)" \
-o bin/darwin/amd64/$(CLI_EXE) $(CLI_PKG) # mac osx
.PHONY: clean
clean:
git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf
.PHONY: get-version
get-version:
@echo $(VERSION)
.PHONY: update-deps
update-deps:
dep ensure --update
.PHONY: fix-deps
fix-deps:
cp storage_fix.go vendor/github.com/chartmuseum/storage/storage.go
.PHONY: tree
tree:
tree -I vendor