-
Notifications
You must be signed in to change notification settings - Fork 93
/
Makefile
50 lines (40 loc) · 1.05 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
# Makefile for Go Wechaty
#
# GitHb: https://github.com/wechaty/python-wechaty
# Author: Huan LI <[email protected]> git.io/zixia
#
SOURCE_GLOB=$(wildcard bin/*.go src/**/*.go tests/**/*.go examples/*.go)
VERSION=$(shell cat VERSION)
.PHONY: all
all : clean lint
.PHONY: clean
clean:
rm -fr dist/*
echo "clean what?"
.PHONY: lint
lint: golint
.PHONY: golint
golint:
~/go/bin/golint wechaty
~/go/bin/golint wechaty-puppet
~/go/bin/golint wechaty-puppet-service
.PHONY: install
install:
go install golang.org/x/lint/golint@latest
.PHONY: gotest
gotest:
go test `go list ./... | grep -v /vendor/` -count=1 -coverpkg=./...
.PHONY: test
test: golint gotest
.PHONY: bot
bot:
go run examples/ding-dong-bot.go
.PHONY: version
version:
@newVersion=$$(awk -F. '{print $$1"."$$2"."$$3+1}' < VERSION) \
&& echo $${newVersion} > VERSION \
&& echo VERSION := \'$${newVersion}\' > src/version.go \
&& git add VERSION src/version.py \
&& git commit -m "$${newVersion}" > /dev/null \
&& git tag "v$${newVersion}" \
&& echo "Bumped version to $${newVersion}"