mirror of
https://gitea.intern.drachenfels.de/ruben/goget.git
synced 2026-02-08 12:48:01 +00:00
18 lines
288 B
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}" ./...
|