forked from ouqiang/gocron
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
67 lines (51 loc) · 1 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: build
build: gocron node
.PHONY: build-race
build-race: enable-race build
.PHONY: run
run: build kill
./bin/gocron-node &
./bin/gocron web -e dev
.PHONY: run-race
run-race: enable-race run
.PHONY: kill
kill:
-killall gocron-node
.PHONY: gocron
gocron:
go build $(RACE) -o bin/gocron ./cmd/gocron
.PHONY: node
node:
go build $(RACE) -o bin/gocron-node ./cmd/node
.PHONY: test
test:
go test $(RACE) ./...
.PHONY: test-race
test-race: enable-race test
.PHONY: enable-race
enable-race:
$(eval RACE = -race)
.PHONY: package
package: build-vue statik
bash ./package.sh
.PHONY: package-all
package-all: build-vue statik
bash ./package.sh -p 'linux darwin windows'
.PHONY: build-vue
build-vue:
cd web/vue && yarn run build
cp -r web/vue/dist/* web/public/
.PHONY: install-vue
install-vue:
cd web/vue && yarn install
.PHONY: run-vue
run-vue:
cd web/vue && yarn run dev
.PHONY: statik
statik:
go get github.com/rakyll/statik
go generate ./...
.PHONY: clean
clean:
rm bin/gocron
rm bin/gocron-node