-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
51 lines (40 loc) · 913 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
42
43
44
45
46
47
48
49
50
51
NAME=webhook-listener
ROOT=github.com/Shelex/${NAME}
GO111MODULE=on
SHELL=/bin/bash
.PHONY: start
start:
go run main.go
.PHONY: build
build:
rm -r bin
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/webhook-listener
.PHONY: simulation
simulation:
k6 run simulation.js
.PHONY: open
open-web:
open http://localhost:8080
.PHONY: prof
prof:
go tool pprof -web http://localhost:6060/debug/pprof/heap
.PHONY: doc
doc:
swag init
.PHONY: lint
lint:
golangci-lint run
.PHONY: web-dev
web-dev:
cd web && npm start
.PHONY: web-build
web-build:
cd web && npm run build
.PHONY: clear
clear:
rm -r web/build && rm -r webhook-listener && rm -r web.tar.gz
.PHONY: pack
pack:
cd web && npm install && npm run build:tailwind && REACT_APP_API_PROTOCOL=https REACT_APP_API_HOST=webhook.monster npm run build && \
cd ../ && tar -czf web.tar.gz ./web/build && \
CGO_ENABLED=0 GOOS=linux go build \