-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
84 lines (70 loc) · 2.02 KB
/
Makefile
File metadata and controls
84 lines (70 loc) · 2.02 KB
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
include Makefile.build.mk
.PHONY: test-unit
test-unit:
go test -v $(TEST_BUILDFLAGS) ./pkg/... ./cmd/...
.PHONY: test-pact
test-pact:
@echo "Running Pact tests..."
@if ! command -v pact-mock-service &> /dev/null; then \
echo "The 'pact-mock-service' command is not found on your PATH. Please install the CLI from the releases page in https://github.com/pact-foundation/pact-ruby-standalone."; \
else \
go test -count=1 -v ./pact/... -tags "$(BUILDTAGS)"; \
fi
.PHONY: test
test: test-unit test-pact
.PHONY: publish-pact
publish-pact:
pact-broker publish ./pacts \
--auto-detect-version-properties \
--consumer-app-version ${PACT_VERSION} \
--verbose
.PHONY: can-i-deploy
can-i-deploy:
pact-broker can-i-deploy \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--to-environment production \
--verbose
.PHONY: record-release
record-release:
pact-broker record-release \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--environment staging \
--verbose
pact-broker record-release \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--environment production \
--verbose
.PHONY: build
build:
go build ${LDFLAGS} ${GCFLAGS} -v -o bin/replicated $(BUILDFLAGS) ./cmd/replicated
.PHONY: fmt
fmt:
go fmt ./pkg/... ./cmd/...
.PHONY: vet
vet:
go vet $(BUILDFLAGS) ./pkg/... ./cmd/...
.PHONY: build-ttl.sh
build-ttl.sh:
dagger call test-chart --progress=plain
.PHONY: mock
mock:
go install github.com/golang/mock/mockgen@v1.6.0
mockgen -source=pkg/store/store_interface.go -destination=pkg/store/mock/mock_store.go
.PHONY: get-govulncheck
get-govulncheck:
@command -v govulncheck >/dev/null 2>&1 || go install golang.org/x/vuln/cmd/govulncheck@latest
.PHONY: get-grype
get-grype:
@command -v grype >/dev/null 2>&1 || curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b $(GOPATH)/bin
.PHONY: scan
scan: get-govulncheck get-grype
govulncheck ./...
grype db update
grype dir:. \
--only-fixed \
--fail-on medium \
-o template \
-t .grype.tmpl