This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.63 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
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := default
.DELETE_ON_ERROR :
.SUFFIXES :# Go parameters
GOCMD := go
GOTEST := $(GOCMD) test
SWAGGERCMD = docker run --rm -it -e GOPATH=$${HOME}/go:/go -v $${HOME}:$${HOME} -w $(shell pwd) quay.io/goswagger/swagger:v0.25.0
.PHONY: default
default: clean build
.PHONY: build
build:
./build.sh
.PHONY: build-local
build-local:
./build.sh local
.PHONY: install
install:
./install.sh
.PHONY: test
test:
$(GOTEST) ./...
test-cover:
$(GOTEST) ./... -race -coverprofile=coverage.txt -covermode=atomic
.PHONY: clean
clean:
rm -rf ./bin
.PHONY: swagger-generate
swagger-generate:
$(SWAGGERCMD) generate client -f ./api/swagger.yml -A anansi -P models.Principal
.PHONY: swagger-validate
swagger-validate:
$(SWAGGERCMD) validate ./api/swagger.yml
.PHONY: mockery
mockery:
mockery -dir cmd/adapters/applications -name VampCloudApplicationsClient -case snake -output ./mocks/adaptersmocks -outpkg adaptersmocks
mockery -dir cmd/adapters/clusters -name VampCloudClustersClient -case snake -output ./mocks/adaptersmocks -outpkg adaptersmocks
mockery -dir cmd/adapters/services -name VampCloudServicesClient -case snake -output ./mocks/adaptersmocks -outpkg adaptersmocks
mockery -dir cmd/adapters/ingresses -name VampCloudIngressesClient -case snake -output ./mocks/adaptersmocks -outpkg adaptersmocks
mockery -dir cmd/adapters/policies -name VampCloudPoliciesClient -case snake -output ./mocks/adaptersmocks -outpkg adaptersmocks
mockery -dir cmd/adapters/releases -name VampCloudReleasesClient -case snake -output ./mocks/adaptersmocks -outpkg adaptersmocks