forked from stripe/stripe-mock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 856 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
GIT_COMMITSHA = $(shell git rev-parse HEAD)
IMAGE_NAME = "stripe/stripe-mock"
all: test vet lint check-gofmt build
build:
go build -mod=vendor -o stripe-mock
check-gofmt:
scripts/check_gofmt.sh
lint:
staticcheck
test:
# -count=1 disables the cache
go test ./... -count=1
vet:
go vet ./...
docker-build:
docker build -t "$(IMAGE_NAME):latest" -t "$(IMAGE_NAME):$(GIT_COMMITSHA)" .
.PHONY: docker-build
docker-run:
docker run --rm -it -p 12111-12112:12111-12112 "$(IMAGE_NAME):latest"
.PHONY: docker-run
update-openapi-spec:
rm -f ./embedded/openapi/spec3.json
rm -f ./embedded/openapi/fixtures3.json
wget https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json -P ./embedded/openapi
wget https://raw.githubusercontent.com/stripe/openapi/master/openapi/fixtures3.json -P ./embedded/openapi
.PHONY: update-openapi-spec