From cf75dece277bf304f0ab0a9c92195c27bc1ce3c9 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sat, 25 May 2024 11:11:36 +0200 Subject: [PATCH] Setup: Improve package build configuration #3861 Signed-off-by: Michael Mayer --- .semver | 1 + Makefile | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 .semver diff --git a/.semver b/.semver new file mode 100644 index 000000000..89b137977 --- /dev/null +++ b/.semver @@ -0,0 +1 @@ +SEMVER_MAJOR=1 \ No newline at end of file diff --git a/Makefile b/Makefile index e69194c93..729301372 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ export GO111MODULE=on +-include .semver -include .env export @@ -12,6 +13,12 @@ export BINARY_NAME=photoprism GOIMPORTS=goimports +# Build version. +SEMVER_MAJOR ?= 0 +SEMVER_MINOR ?= $(shell date -u +%y%m) +SEMVER_PATCH ?= $(shell date -u +%d) +SEMVER_VERSION ?= $(SEMVER_MAJOR).$(SEMVER_MINOR).$(SEMVER_PATCH) + # Build parameters. BUILD_PATH ?= $(shell realpath "./build") BUILD_DATE ?= $(shell date -u +%y%m%d)