15 lines
390 B
Makefile
15 lines
390 B
Makefile
GO ?= go
|
|
EXECUTABLE := forgejo-mcp
|
|
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
|
LDFLAGS := -X "main.Version=$(VERSION)"
|
|
|
|
.PHONY: build
|
|
build:
|
|
$(GO) build -v -ldflags '-s -w $(LDFLAGS)' -o $(EXECUTABLE)
|
|
|
|
## vendor: tidy and verify module dependencies
|
|
.PHONY: vendor
|
|
vendor:
|
|
@echo 'Tidying and verifying module dependencies...'
|
|
go mod tidy
|
|
go mod verify
|