Replaced build system.
This commit is contained in:
19
Makefile
Normal file
19
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user