-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
50 lines (39 loc) · 850 Bytes
/
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
.PHONY: fmt
fmt:
cd frontend && npx prettier --write "src/*.{js,css}"
go fmt ./cmd/...
go fmt ./pkg/...
.PHONY: dev-fe
dev-fe:
cd frontend && npm run start
.PHONY: check-env
check-env:
: REPLICATED_API_TOKEN
@if [ -z "${REPLICATED_API_TOKEN}" ]; then exit 1; fi
: ✅
: REPLICATED_APP
@if [ -z "${REPLICATED_APP}" ]; then exit 1; fi
: ✅
.PHONY: serve
serve: check-env
go run ./cmd/enterprise-gtm-starter
.PHONY: helm-release-dev
helm-release-dev:
helm dependency update
helm package -d manifests .
replicated release create --auto -y
.PHONY: test
test:
go test ./...
.PHONY: vet
vet:
go vet ./...
.PHONY: vet
lint:
replicated release lint --yaml-dir=manifests
.PHONY: pre-push
pre-push: check-env vet test lint
.PHONY: pre-push
setup-git-hooks:
echo "make pre-push" > .git/hooks/pre-push
chmod +x .git/hooks/pre-push