You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
476 B
21 lines
476 B
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
|
|
|