-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
49 lines (35 loc) · 996 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
all: submodule
precommit: fmt license test
build:
cd main && go build
test:
@go test -race ./main/...
run: build
cd main && ./main
test_run: build
cd main && ./main & export TASK_PID=$$! && sleep 10 && kill $$TASK_PID
fmt:
@go fmt ./main/...
license:
@go run $(GOPATH)/src/github.com/limetext/tasks/gen_license.go -scan=main
check_fmt:
ifneq ($(shell gofmt -l main),)
$(error code not fmted, run make fmt. $(shell gofmt -l main))
endif
check_license:
@go run $(GOPATH)/src/github.com/limetext/tasks/gen_license.go -scan=main -check
tasks:
go get -d -u github.com/limetext/tasks
submodule:
git submodule update --init --recursive
glide:
go get -v -u github.com/Masterminds/glide
glide install
travis:
ifeq ($(TRAVIS_OS_NAME),osx)
brew update
brew install oniguruma python3
endif
travis: glide tasks
travis_test: export PKG_CONFIG_PATH += $(PWD)/vendor/github.com/limetext/rubex:$(GOPATH)/src/github.com/limetext/rubex
travis_test: test test_run check_fmt check_license