Remove shell build script and replaced it with a Makefile.

This commit is contained in:
slawek committed 2025-12-10 20:37:03 +01:00
1 parent 7c58e29799
commit 3134b1dc44
2 files changed
+21 -11

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# Makefile for building testver
# Get version from git tags
VERSION := $(shell git describe --tags --always 2>/dev/null)
# Default target
.PHONY: testver clean
testver:
ifneq ($(VERSION),)
@echo "Building version: $(VERSION)"
go build -o testver -ldflags "-X main.Version=$(VERSION)"
else
@echo "Building without version information"
go build -o testver .
endif
clean:
rm -f testver
.DEFAULT_GOAL := testver