diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | .PHONY: dev build clean | 1 | .PHONY: dev build profile bench test clean |
2 | 2 | ||
3 | all: dev | 3 | all: dev |
4 | 4 | ||
@@ -6,8 +6,16 @@ dev: build | |||
6 | ./gopherproxy -bind 127.0.0.1:8000 | 6 | ./gopherproxy -bind 127.0.0.1:8000 |
7 | 7 | ||
8 | build: clean | 8 | build: clean |
9 | go get ./... | ||
10 | go build -o ./gopherproxy ./cmd/gopherproxy/main.go | 9 | go build -o ./gopherproxy ./cmd/gopherproxy/main.go |
11 | 10 | ||
11 | profile: | ||
12 | @go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench . | ||
13 | |||
14 | bench: | ||
15 | @go test -v -bench . | ||
16 | |||
17 | test: | ||
18 | @go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic . | ||
19 | |||
12 | clean: | 20 | clean: |
13 | rm -rf gopherproxy | 21 | @git clean -f -d -X |