-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (38 loc) · 938 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
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOFMT = $(GOCMD) fmt
GOGET = $(GOCMD) get
GOMOD = $(GOCMD) mod
GOVET = $(GOCMD) vet
BASE_NAME=curio
build: darwin web deploy-templates
all: darwin linux web deploy-templates
linux-full: linux web deploy-templates
darwin-full: darwin web deploy-templates
web:
mkdir -p bin/
cd frontend && npm install && npm run build
rm -rf bin/public
mv frontend/dist bin/public
darwin:
GOOS=darwin GOARCH=amd64 $(GOBUILD) -a -o bin/$(BASE_NAME).darwin viewsrv/*.go
linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -a -installsuffix cgo -o bin/$(BASE_NAME).linux viewsrv/*.go
deploy-templates:
mkdir -p bin/
rm -rf bin/templates
mkdir -p bin/templates
cp ./templates/* bin/templates
clean:
rm -rf bin
fmt:
cd viewsrv; $(GOFMT)
vet:
cd viewsrv; $(GOVET)
dep:
cd frontend && npm upgrade
$(GOGET) -u ./viewsrv/...
$(GOMOD) tidy
$(GOMOD) verify