-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (42 loc) · 928 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
45
46
47
48
49
50
51
52
53
54
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGENERATE=$(GOCMD) generate
BINARY_NAME=passa
BUILD_DIR=build
BINARY_UNIX=$(BINARY_NAME)_unix
BINARY_WINDOWS=$(BINARY_NAME)_win
.PHONY: all test clean server
compile:
$(GOBUILD)
validate:
$(GOGENERATE) #this also validates the pass-states.yml
test:
go generate
go clean -testcache
go test ./... -cover
cover:
$(GOTEST) -coverprofile cp.out
$(GOCMD) tool cover -html=cp.out
run:
$(GOGENERATE)
$(GOBUILD)
./Passa
clean:
$(GOCLEAN) -testcache
- rm .db.json
- rm build/*
- rm -r .db
server:
make validate
make compile
./Passa --no-cloud
dist:
go build -o build/passa_mac
env GOOS=linux GOARCH=amd64 go build -o build/passa_linux
env GOOS=windows GOARCH=386 go build -o build/pass_win
linux:
env GOOS=linux GOARCH=amd64 go build -o build/passa_linux
scp build/passa_linux root@10.155.209.58:./Passa/.