-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (34 loc) · 977 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
GO_FILES=$(shell find . -name '*.go' | grep -v /vendor/)
HTML_FILES=$(shell find . -name '*.html')
.PHONY: build
build: bin/cyn
.PHONY: build-all
build-all: bin/cyn bin/cyn-linux bin/cyn-mac bin/cyn-windows
# Build for local
bin/cyn: \
$(GO_FILES) \
$(HTML_FILES)
CGO_ENABLED=0 go build -o bin/cyn ./cmd/cyn/*.go
# Build for other OSes
bin/cyn-linux: $(GO_FILES) $(HTML_FILES)
CGO_ENABLED=0 GOOS=linux go build -o bin/cyn-linux ./cmd/cyn/*.go
bin/cyn-mac: $(GO_FILES) $(HTML_FILES)
CGO_ENABLED=0 GOOS=darwin go build -o bin/cyn-mac ./cmd/cyn/*.go
bin/cyn-windows: $(GO_FILES) $(HTML_FILES)
CGO_ENABLED=0 GOOS=windows go build -o bin/cyn-windows ./cmd/cyn/*.go
.PHONY: docker
docker:
docker build -t evertras/cynomys:latest .
.PHONY: test
test:
go test ./pkg/...
.PHONY: bdd
bdd: bin/cyn
go test -race -v ./tests
.PHONY: fmt
fmt: node_modules
go fmt ./...
npx prettier --write .
node_modules: package.json package-lock.json
npm install
@touch node_modules