Setup: Improve package build configuration #3861

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-05-25 11:11:36 +02:00
parent 3625f94065
commit cf75dece27
2 changed files with 8 additions and 0 deletions

1
.semver Normal file
View File

@@ -0,0 +1 @@
SEMVER_MAJOR=1

View File

@@ -5,6 +5,7 @@
export GO111MODULE=on export GO111MODULE=on
-include .semver
-include .env -include .env
export export
@@ -12,6 +13,12 @@ export
BINARY_NAME=photoprism BINARY_NAME=photoprism
GOIMPORTS=goimports 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 parameters.
BUILD_PATH ?= $(shell realpath "./build") BUILD_PATH ?= $(shell realpath "./build")
BUILD_DATE ?= $(shell date -u +%y%m%d) BUILD_DATE ?= $(shell date -u +%y%m%d)