mirror of
https://github.com/moul/sshportal.git
synced 2025-03-10 06:17:23 +08:00
19 lines
584 B
Makefile
19 lines
584 B
Makefile
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)"
|
|
|
|
.PHONY: install
|
|
install:
|
|
go install -ldflags $(LDFLAGS) .
|
|
|
|
.PHONY: dev
|
|
dev:
|
|
-go get github.com/githubnemo/CompileDaemon
|
|
CompileDaemon -exclude-dir=.git -exclude=".#*" -color=true -command="./sshportal --demo --debug" .
|
|
|
|
.PHONY: test
|
|
test:
|
|
go test -i .
|
|
go test -v .
|