-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (34 loc) · 1016 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
36
37
38
39
40
41
.SILENT: requirements run
default: run
clean:
go clean
kind delete cluster
run:
echo "INFO: see Apollo Backend here: http://localhost:8080/sandbox"
go run main.go -headless=true > /dev/null
fullstack:
wails dev
run-with-deps: requirements build-cluster
go mod tidy
go fmt ./...
open http://localhost:8080/sandbox
go run app.go main.go -headless=true > /dev/null
build:
CGO_ENABLED=0 GOOS=darwin go build -o bin/apigateway-darwin cmd/server/main.go
CGO_ENABLED=0 GOOS=linux go build -o bin/apigateway cmd/server/main.go
CGO_ENABLED=0 GOOS=windows go build -o bin/apigateway.exe cmd/server/main.go
build-cluster:
kind create cluster || true
requirements:
# Check if all required commands are installed
REQUIRED_CLI=("go" "kind" "docker" "wails") && \
for command in "$${REQUIRED_CLI[@]}"; \
do \
if ! command -v "$$command" &> /dev/null; \
then \
echo "ERROR: Please make sure $$command is installed and try again."; \
exit 1; \
fi \
done
gen:
go generate ./...