prefix = /usr/local # Support upper case PREFIX ifneq ($(PREFIX),) prefix := $(PREFIX) endif bindir = $(prefix)/bin builddir = ./build VERSION = 0.0.6 .PHONY: build build: go build -o $(builddir)/ .PHONY: install install: build install -m 0755 $(builddir)/yr $(bindir) .PHONY: clean clean: rm -f $(builddir)/* rm -rf yr-* rm -f yr-*.tar.gz .PHONY: build-release build-release: build mkdir -p yr-$(VERSION) cp $(builddir)/yr* yr-$(VERSION)/ tar czf yr-$(VERSION)-$(GOOS)-$(ARCH).tar.gz yr-$(VERSION) hut git artifact upload --rev $(TAG) yr-$(VERSION)-$(GOOS)-$(ARCH).tar.gz .PHONY: test test: go test ./... .PHONY: vet vet: go vet ./...