Files
goget/Makefile

18 lines
288 B
Makefile

COMMIT = $(shell git describe --always --tags --long --dirty)
RELEASE ?= $(COMMIT)
LDFLAGS := -X main.version=$(RELEASE)
ifdef STATIC
LDFLAGS += -w -s -extldflags=-static
export CGO_ENABLED=0
endif
all: fmt install
fmt:
go fmt ./...
install:
go install -ldflags "${LDFLAGS}" ./...