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)