Replaced build system.

This commit is contained in:
2025-12-10 21:09:52 +01:00
parent 2ddd22631b
commit e3c812592b
4 changed files with 19 additions and 13 deletions

19
Makefile Normal file
View File

@@ -0,0 +1,19 @@
# Get version from git tags
VERSION := $(shell git describe --tags --always 2>/dev/null)
.PHONY: clean
build/lab-ca: main.go ca.go certdb.go
@mkdir -p build
ifneq ($(VERSION),)
@echo "Building version: $(VERSION)"
go build -o build/lab-ca -ldflags "-X main.Version=$(VERSION)"
else
@echo "Building without version information"
go build -o build/lab-ca .
endif
lab-ca: build/lab-ca
clean:
rm -f build/lab-ca