Calculate tags and version automatically (#100)

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil
2024-04-24 11:31:22 +02:00
committed by GitHub
parent ca79f725a3
commit 20fcd25d64
40 changed files with 109 additions and 107 deletions

10
scripts/common-envs.mk Normal file
View File

@@ -0,0 +1,10 @@
REGISTRY := ghcr.io/aenix-io/cozystack
PUSH := 1
LOAD := 0
VERSION = $(patsubst v%,%,$(shell git describe --tags --abbrev=0))
TAG = $(shell git describe --tags --exact-match 2>/dev/null || echo latest)
# Returns 'latest' if the git tag is not assigned, otherwise returns the provided value
define settag
$(if $(filter $(TAG),latest),latest,$(1))
endef