-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (23 loc) · 1.11 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
FAKE ?= true
.PHONY: all
all: format test build
.PHONY: build
build:
docker buildx build -t kubeshop/kusk-gateway-api -f build/api-server/Dockerfile .
docker tag kubeshop/kusk-gateway-api ttl.sh/kubeshop/kusk-gateway-api:latest
docker tag kubeshop/kusk-gateway-api ttl.sh/kubeshop/kusk-gateway-api:$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
@echo
docker buildx build -t kubeshop/kusk-gateway-api-websocket -f build/websocket/Dockerfile .
docker tag kubeshop/kusk-gateway-api-websocket ttl.sh/kubeshop/kusk-gateway-api-websocket:latest
docker tag kubeshop/kusk-gateway-api-websocket ttl.sh/kubeshop/kusk-gateway-api-websocket:$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
server-generate:
openapi-generator-cli generate -i api/openapi.yaml -g go-server -o server/ --additional-properties=featureCORS=true
run:
docker-compose up --build -d
run-minikube:
docker-compose -f docker-compose.yaml -f docker-compose-minikube.yaml up --build --force-recreate
test:
cd ./server && FAKE=${FAKE} go test -v -count=1 ./...
.PHONY: format
format:
cd ./server && go fmt ./...