COMMIT := $(shell git rev-list -1 HEAD) LDFLAGS := "-X 'main.Commit=$(COMMIT)'" DIST_LDFLAGS := $(LDFLAGS)" -s -w" default: build build: @go build -ldflags=$(LDFLAGS) . install: @go install -ldflags=$(LDFLAGS) . test: @go test ./... -cover -v clean: @rm -f /tmp/distribusi-go* && rm ./distribusi release: @goreleaser release --snapshot --rm-dist && \ ssh varia.zone mkdir -p public_html/distribusi-go/$(VERSION) && \ scp -r dist/* varia.zone:public_html/distribusi-go/$(VERSION) .PHONY: build install test clean release