-
Notifications
You must be signed in to change notification settings - Fork 158
/
Makefile
44 lines (31 loc) · 898 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
40
41
42
43
44
.PHONY: build test bootstrap
REPO = remind101/empire
TYPE ?= patch
ARTIFACTS ?= build
cmds: build/empire build/emp
clean:
rm -rf build/*
build/empire:
go build -o build/empire ./cmd/empire
build/emp:
go build -o build/emp ./cmd/emp
bootstrap: cmds
createdb empire || true
./build/empire migrate
build: Dockerfile
docker build -t ${REPO} .
test: build/emp
go test -race $(shell go list ./... | grep -v /vendor/)
./tests/deps
vet:
go vet $(shell go list ./... | grep -v /vendor/)
bump:
pip install --upgrade bumpversion
bumpversion ${TYPE}
$(ARTIFACTS)/all: $(ARTIFACTS)/emp-Linux-x86_64 $(ARTIFACTS)/emp-Darwin-x86_64 $(ARTIFACTS)/empire-Linux-x86_64
$(ARTIFACTS)/emp-Linux-x86_64:
env GOOS=linux go build -o $@ ./cmd/emp
$(ARTIFACTS)/emp-Darwin-x86_64:
env GOOS=darwin go build -o $@ ./cmd/emp
$(ARTIFACTS)/empire-Linux-x86_64:
env GOOS=linux go build -o $@ ./cmd/empire