2016-02-07 11:36:32 +08:00
|
|
|
PKGS := $(filter-out main,$(shell go list -f '{{.Name}}' ./...))
|
2014-09-28 17:22:28 +08:00
|
|
|
PKG_COVERS := $(addprefix cover/,$(PKGS))
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2016-02-09 08:24:21 +08:00
|
|
|
all: get test
|
2014-01-31 21:08:56 +08:00
|
|
|
|
2015-02-27 09:29:40 +08:00
|
|
|
get:
|
2016-02-21 07:37:29 +08:00
|
|
|
go get . ./elvish-stub
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-01-25 21:15:54 +08:00
|
|
|
test:
|
2016-01-28 07:26:30 +08:00
|
|
|
go test ./...
|
2016-02-21 07:45:03 +08:00
|
|
|
./elvish-stub/test.sh
|
2014-01-25 21:15:54 +08:00
|
|
|
|
2014-09-25 05:56:12 +08:00
|
|
|
cover/%: %
|
|
|
|
mkdir -p cover
|
2014-01-25 21:15:54 +08:00
|
|
|
go test -coverprofile=$@ ./$<
|
|
|
|
|
2014-09-28 17:22:28 +08:00
|
|
|
cover: $(PKG_COVERS)
|
2014-01-25 21:15:54 +08:00
|
|
|
|
2015-02-27 09:29:40 +08:00
|
|
|
generate:
|
|
|
|
go generate ./...
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2016-02-10 06:10:26 +08:00
|
|
|
# The target to run on Travis-CI.
|
2016-02-10 06:20:31 +08:00
|
|
|
travis: get test
|
2016-02-21 07:37:29 +08:00
|
|
|
tar cfJ elvish.tar.xz -C $(GOPATH)/bin elvish elvish-stub
|
|
|
|
curl http://dl.elvish.io:6060/ -F name=elvish-$(TRAVIS_OS_NAME).tar.xz -F token=$$UPLOAD_TOKEN -F file=@./elvish.tar.xz
|
2016-02-10 06:10:26 +08:00
|
|
|
|
|
|
|
.PHONY: all get test cover generate travis
|