1
0
mirror of https://github.com/taigrr/bitcask synced 2025-01-18 04:03:17 -08:00

Initial Commit

This commit is contained in:
James Mills
2019-03-09 22:41:59 +10:00
commit a42cd20ddf
26 changed files with 1706 additions and 0 deletions

39
Makefile Normal file
View File

@@ -0,0 +1,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