-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 781 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 781 Bytes
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
VERSION := $(shell cat main.go | grep -v '//' | grep -m 1 Version | sed -e 's/Version =//g' | xargs)
name := $(shell basename "$(CURDIR)")
package := $(CURDIR:$(GOPATH)/src/%=%)
registry := quay.io/unity3d
# -- START GENERIC BUILD/PUSH -- #
build:
docker build \
--build-arg go_package=$(package) \
-t \
$(registry)/$(name):${VERSION} .
docker run \
--entrypoint "bash" \
--rm \
$(registry)/$(name):${VERSION} \
-c \
"make test"
push:
docker push \
$(registry)/$(name):${VERSION}
# -- START APPLICATION SPECIFIC -- #
test:
go get -d -t -v ./... && go test -cover -race ./... -v
pprof-goroutine:
curl http://localhost:6060/debug/pprof/goroutine?debug=1
pprof-heap:
curl http://localhost:6060/debug/pprof/heap?debug=1
.PHONY: login build push test