gocron/makefile

44 lines
579 B
Makefile
Raw Normal View History

2018-02-04 03:28:48 +00:00
2018-03-25 05:12:12 +00:00
.PHONY: build
2018-02-04 03:28:48 +00:00
build: gocron node
2018-04-22 01:25:10 +00:00
.PHONY: build-race
build-race: enable-race build
.PHONY: run
run: build kill
./bin/gocron-node &
./bin/gocron web
2018-02-04 03:28:48 +00:00
2018-04-22 01:25:10 +00:00
.PHONY: run-race
run-race: enable-race run
2018-02-04 03:28:48 +00:00
2018-04-22 01:25:10 +00:00
.PHONY: kill
kill:
-killall gocron-node
.PHONY: gocron
gocron:
go build $(RACE) -o bin/gocron ./cmd/gocron
2018-02-04 03:28:48 +00:00
2018-03-25 05:12:12 +00:00
.PHONY: node
2018-02-04 03:28:48 +00:00
node:
2018-04-22 01:25:10 +00:00
go build $(RACE) -o bin/gocron-node ./cmd/node
.PHONY: test
test:
go test $(RACE) ./...
2018-02-04 03:28:48 +00:00
2018-04-22 01:25:10 +00:00
.PHONY: test-race
test-race: enable-race test
.PHONY: enable-race
enable-race:
$(eval RACE = -race)
2018-02-04 03:28:48 +00:00
2018-03-25 05:12:12 +00:00
.PHONY: clean
2018-02-04 03:28:48 +00:00
clean:
rm bin/gocron
2018-04-22 01:25:10 +00:00
rm bin/gocron-node