forked from helm/chartmuseum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (67 loc) · 2.18 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Change this and commit to create new release
VERSION=0.8.2
REVISION := $(shell git rev-parse --short HEAD;)
CM_LOADTESTING_HOST ?= http://localhost:8080
.PHONY: bootstrap
bootstrap:
@go mod download && go mod vendor
.PHONY: build
build: build-linux build-mac build-windows
build-windows: export GOARCH=amd64
build-windows:
@GOOS=windows go build -mod=vendor -v --ldflags="-w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)" \
-o bin/windows/amd64/chartmuseum cmd/chartmuseum/main.go # windows
build-linux: export GOARCH=amd64
build-linux: export CGO_ENABLED=0
build-linux:
@GOOS=linux go build -mod=vendor -v --ldflags="-w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)" \
-o bin/linux/amd64/chartmuseum cmd/chartmuseum/main.go # linux
build-mac: export GOARCH=amd64
build-mac: export CGO_ENABLED=0
build-mac:
@GOOS=darwin go build -mod=vendor -v --ldflags="-w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)" \
-o bin/darwin/amd64/chartmuseum cmd/chartmuseum/main.go # mac osx
.PHONY: clean
clean:
@git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf
.PHONY: setup-test-environment
setup-test-environment:
@./scripts/setup_test_environment.sh
.PHONY: test
test: setup-test-environment
@./scripts/test.sh
.PHONY: startloadtest
startloadtest:
@cd loadtesting && pipenv install
@cd loadtesting && pipenv run locust --host $(CM_LOADTESTING_HOST)
.PHONY: covhtml
covhtml:
@go tool cover -html=.cover/cover.out
.PHONY: acceptance
acceptance: setup-test-environment
@./scripts/acceptance.sh
.PHONY: run
run:
@rm -rf .chartstorage/
@bin/darwin/amd64/chartmuseum --debug --port=8080 --storage="local" \
--storage-local-rootdir=".chartstorage/"
.PHONY: tree
tree:
@tree -I vendor
# https://github.com/hirokidaichi/goviz/pull/8
.PHONY: goviz
goviz:
#@go get -u github.com/RobotsAndPencils/goviz
@goviz -i github.com/helm/chartmuseum/cmd/chartmuseum -l | dot -Tpng -o goviz.png
.PHONY: release-latest
release-latest:
@scripts/release.sh latest
.PHONY: release-stable
release-stable:
@scripts/release.sh $(VERSION)
.PHONY: version-released
version-released:
@scripts/version_released.sh $(VERSION)
.PHONY: get-version
get-version:
@echo $(VERSION)