openquell/Makefile

21 lines
526 B
Makefile
Raw Normal View History

version = $(shell egrep "version string = " config/static.go | cut -d'"' -f 2)
BRANCH = $(shell git branch --show-current)
COMMIT = $(shell git rev-parse --short=8 HEAD)
BUILD = $(shell date +%Y.%m.%d.%H%M%S)
#VERSION := $(if $(filter $(BRANCH), development),$(version)-$(BRANCH)-$(COMMIT)-$(BUILD),$(version))
VERSION := $(version)-$(BRANCH)-$(COMMIT)-$(BUILD)
2024-02-06 15:26:20 +01:00
all: clean build
@echo ok
clean:
rm -f openquell
build:
go build -ldflags "-X 'openquell/config.VERSION=$(VERSION)'"
2024-02-06 15:26:20 +01:00
test:
@echo $(VERSION)