-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathMakefile
39 lines (27 loc) · 780 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
.PHONY: dev build generate install image release profile bench test clean
CGO_ENABLED=0
COMMIT=$(shell git rev-parse --short HEAD)
all: dev
dev: build
@./bitcask --version
build: clean generate
@go build \
-tags "netgo static_build" -installsuffix netgo \
-ldflags "-w -X $(shell go list)/.Commit=$(COMMIT)" \
./cmd/bitcask/...
generate:
@go generate $(shell go list)/...
install: build
@go install ./cmd/bitcask/...
image:
@docker build -t prologic/bitcask .
release:
@./tools/release.sh
profile: build
@go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench ./...
bench: build
@go test -v -benchmem -bench=. ./...
test: build
@go test -v -cover -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... -race ./...
clean:
@git clean -f -d -X