You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lenmonitor/Makefile

23 lines
499 B
Makefile

NAME = lenmonitor
FULL_NAME = LenMonitor
MAIN_GO = ./cmd/*.go
export GOMODULE111=on
VERSION = $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
LDFLAGS = -w -s -X "main.Version=$(VERSION)" -X "internal/tester.UserAgent=$(FULL_NAME)/$(VERSION)"
.PHONY: all fmt clean
all:
mkdir -p ./dist/bin/
go build -trimpath -ldflags="$(LDFLAGS)" -o ./dist/bin/$(NAME) $(MAIN_GO)
chmod +x ./dist/bin/$(NAME)
fmt:
@gofmt -w $(shell find ./ -type f -name '*.go')
clean:
rm -rf ./dist/