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 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 release