distribusi-go/Makefile

22 lines
476 B
Makefile
Raw Normal View History

2022-02-04 17:01:30 +01:00
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