diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-21 08:20:16 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-21 08:20:16 +1000 |
| commit | d7a1eab5beba4241dab4402c5cd268432d7b46cd (patch) | |
| tree | 6383b4ebf511b58597d827dc5af00b71c72caf38 /Makefile | |
| parent | 13ffd7117180d1a3093ff291481caeb07a8b71de (diff) | |
Migrate to Go111Modules, Add Dockerfile and GoRelaser support
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7d44d84 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +.PHONY: dev build install test release clean + +CGO_ENABLED=0 +VERSION=$(shell git describe --abbrev=0 --tags) +COMMIT=$(shell git rev-parse --short HEAD) + +all: dev + +dev: build + @./tube + +build: clean + @go build \ + -tags "netgo static_build" -installsuffix netgo \ + -ldflags "-w -X $(shell go list).Version=$(VERSION) -X $(shell go list).Commit=$(COMMIT)" \ + . + +install: build + @go install + +test: install + @go test + +release: + @./tools/release.sh + +clean: + @git clean -f -d -X |
