forked from tmoneypenny/conspirator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 1.17 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
31
32
33
34
35
36
37
38
39
.Default_GOAL := build
BIN_FILE=conspirator
build:
swag init -dir internal/pkg/http/api/v1/ -g api.go --output internal/pkg/http/api/v1/docs
go build -o "${BIN_FILE}" cmd/conspirator/main.go
bundle:
swag init -dir internal/pkg/http/api/v1/ -g api.go --output internal/pkg/http/api/v1/docs
go build -o "${BIN_FILE}" cmd/conspirator/main.go
mkdir -p bundle/bin/ bundle/config/ bundle/templates/ bundle/plugins/
cp "${BIN_FILE}" bundle/bin/${BIN_FILE}
cp internal/pkg/http/template/*.tmpl bundle/templates/
find plugins/ -type f -name '*.so' -exec cp {} bundle/plugins/ \;
cp configs/conspirator.config bundle/config/conspirator.config
tar -czf "${BIN_FILE}.tgz" bundle/
run:
./${BIN_FILE} start
debug:
swag init -dir internal/pkg/http/api/v1/ -g api.go --output internal/pkg/http/api/v1/docs
go build -o "${BIN_FILE}" cmd/conspirator/main.go
./${BIN_FILE} start --profile
priv:
swag init -dir internal/pkg/http/api/v1/ -g api.go --output internal/pkg/http/api/v1/docs
go build -o "${BIN_FILE}" cmd/conspirator/main.go
sudo ./${BIN_FILE} start --profile
test:
go test -v ./internal/pkg/...
clean:
go clean
rm -rf bundle/
rm -f "${BIN_FILE}"
rm -f ${BIN_FILE}.tgz