-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 842 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
52
NAME=parallel-specs
ROOT=github.com/Shelex/${NAME}
GO111MODULE=on
SHELL=/bin/bash
.PHONY: start
start:
go run main.go
.PHONY: build
build:
rm -rf bin
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/${NAME}
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" scripts/migrate/migrate.go
mv migrate bin
.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: migration
migration:
go run $(shell pwd)/scripts/migrate ${version} ${direction}
.PHONY: lint
lint:
golangci-lint run
.PHONY: deps
deps:
go mod tidy
go mod download
.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 parallel-specs && rm -r web.tar.gz