sshportal/Makefile

20 lines
584 B
Makefile
Raw Normal View History

2017-11-14 07:38:23 +08:00
PACKAGE ?= github.com/moul/sshportal
GIT_SHA ?= $(shell git rev-parse HEAD)
GIT_TAG ?= $(shell git describe --tags --always)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
LDFLAGS ?= "-X $(PACKAGE)/main.GIT_SHA=$(GIT_SHA) -X $(PACKAGE)/main.GIT_TAG=$(GIT_TAG) -X $(PACKAGE)/main.GIT_BRANCH=$(GIT_BRANCH)"
2017-10-31 16:31:36 +08:00
.PHONY: install
install:
2017-11-14 07:38:23 +08:00
go install -ldflags $(LDFLAGS) .
2017-10-31 16:31:36 +08:00
.PHONY: dev
dev:
-go get github.com/githubnemo/CompileDaemon
2017-10-31 17:17:06 +08:00
CompileDaemon -exclude-dir=.git -exclude=".#*" -color=true -command="./sshportal --demo --debug" .
2017-11-13 17:13:17 +08:00
.PHONY: test
test:
go test -i .
go test -v .