This commit is contained in:
2023-03-14 19:48:22 +01:00
parent 3f91774a87
commit 0bd5587ce2
3 changed files with 61 additions and 0 deletions

14
docker/Makefile Normal file
View File

@@ -0,0 +1,14 @@
upd = ../upd/upd
version = $(shell egrep "= .v" ../upd/cfg/config.go | cut -d'=' -f2 | 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))
v:
@echo $(VERSION)
build:
cp -a ../updlocal upd
make -C upd clean
docker-compose build --build-arg VERSION=$(VERSION)