-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.07 KB
/
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
45
46
47
48
49
50
MAIN := dmexe.me
BIN := $(CURDIR)/bin/daemon
GOVENDOR := bin/env -c src/$(MAIN) $(CURDIR)/bin/govendor
ID_RSA := $(CURDIR)/bin/id_rsa
GO := bin/env go
GOLINT := bin/env golint
PACKAGES = $(shell $(GOVENDOR) list -no-status +local)
all: build.dev
check.fmt:
$(GO) fmt $(PACKAGES)
check.vet:
$(GO) vet $(PACKAGES)
check.lint:
$(GOLINT) -set_exit_status $(PACKAGES)
check: check.fmt check.vet check.lint
test: check
$(GO) test -cover -race -timeout 1m -v $(PACKAGES)
@echo "OK"
build.dev:
$(GO) build -race -o $(BIN) $(MAIN)
build.release:
GOOS=linux GOARCH=amd64 $(GO) build -ldflags "-s -w" -o $(BIN)-Linux-x86_64 $(MAIN)
GOOS=darwin GOARCH=amd64 $(GO) build -ldflags "-s -w" -o $(BIN)-Darwin-x86_64 $(MAIN)
run: build.dev $(ID_RSA)
$(BIN) -ssh -ssh.key $(ID_RSA) -api -api.marathon.url http://marathon.mesos:8080/v2 -debug
deps:
bin/install-deps
$(GOVENDOR) sync
deps.list:
$(GOVENDOR) list
deps.remove.unused:
$(GOVENDOR) remove +unused
deps.fetch.missing:
$(GOVENDOR) fetch -v +missing
$(ID_RSA):
ssh-keygen -t rsa -P '' -C '' -f $(ID_RSA)