aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 8377afeabffbf8d20403895263a39d9e3a50fea5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.PHONY: dev build profile bench test clean

all: dev

dev: build
	./gopherproxy -bind 127.0.0.1:8000

build: clean
	sassc -t compressed css/main.scss style.go
	sed -i "s/.*/package gopherproxy\n\nvar styletext = \`&\`/" style.go
	go build -o ./gopherproxy ./cmd/gopherproxy/main.go

profile:
	@go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench .

bench:
	@go test -v -bench .

test:
	@go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic .

clean:
	@git clean -f -d -X