mirror of https://github.com/ouqiang/gocron
makefile构建增加竞态条件检测
parent
2bae3cf9ed
commit
16b9a7702b
|
@ -31,11 +31,8 @@ conf
|
||||||
profile/*
|
profile/*
|
||||||
public/resource/javascript/vue.js
|
public/resource/javascript/vue.js
|
||||||
/gocron
|
/gocron
|
||||||
gocron.exe
|
|
||||||
/gocron-node
|
/gocron-node
|
||||||
gocron-node.exe
|
|
||||||
/bin
|
/bin
|
||||||
/packages
|
/packages
|
||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
package.json
|
|
35
makefile
35
makefile
|
@ -1,22 +1,43 @@
|
||||||
|
|
||||||
default: build
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: gocron node
|
build: gocron node
|
||||||
|
|
||||||
|
.PHONY: build-race
|
||||||
|
build-race: enable-race build
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run: build kill
|
||||||
|
./bin/gocron-node &
|
||||||
|
./bin/gocron web
|
||||||
|
|
||||||
|
.PHONY: run-race
|
||||||
|
run-race: enable-race run
|
||||||
|
|
||||||
|
.PHONY: kill
|
||||||
|
kill:
|
||||||
|
-killall gocron-node
|
||||||
|
|
||||||
.PHONY: gocron
|
.PHONY: gocron
|
||||||
gocron:
|
gocron:
|
||||||
|
go build $(RACE) -o bin/gocron ./cmd/gocron
|
||||||
go build -o bin/gocron ./cmd/gocron
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: node
|
.PHONY: node
|
||||||
node:
|
node:
|
||||||
|
go build $(RACE) -o bin/gocron-node ./cmd/node
|
||||||
|
|
||||||
go build -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: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
rm bin/gocron
|
rm bin/gocron
|
||||||
rm bin/gocron-node
|
rm bin/gocron-node
|
||||||
|
|
Loading…
Reference in New Issue