-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (26 loc) · 838 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
VERSION := 0.1.0dev
BUILD_DATE := $(shell date +%F)
DOCKER_TAG ?= flapi:$(VERSION)
all: flapi
flapi:
go build -mod vendor -a -installsuffix nocgo -ldflags "\
-X main.version=$(VERSION) \
-X main.buildDate=$(BUILD_DATE) \
" \
./cmd/flapi
docker:
@docker build \
--build-arg VERSION=$(VERSION) \
--build-arg BUILD_DATE=$(BUILD_DATE) \
-t $(DOCKER_TAG) .
chaos:
@curl -X PUT -H 'Content-Type: application/json' \
-d '{"error":{"status_code":504,"p":1},"delay":{"duration":3000,"p":0.5}}' \
'localhost:8666/?method=POST&path=/api/a'
@curl 'localhost:8666/?method=POST&path=/api/a'
@curl -X PUT -H 'Content-Type: application/json' \
-d '{"error":{"status_code":599,"message":"lolnope!","p":1}}' \
'localhost:8666/?method=GET&path=/api/b'
@curl 'localhost:8666/?method=GET&path=/api/b'
clean:
@rm -rf flapi