build: allow VERSION and VERSION_DEV to be overridden via environment

Changed from immediate assignment (:=) to conditional assignment (?=)
to allow developers to override version numbers when building.

This enables building with custom versions for testing:
  VERSION=0.4.9 ./dev_deploy.sh -r <ip> --install

Useful for testing version-gated features without bumping the
default production version.
This commit is contained in:
Alex P 2025-10-18 00:48:20 +03:00
parent 8189861bfa
commit f56e1480d1
1 changed files with 2 additions and 2 deletions

View File

@ -2,8 +2,8 @@ BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
BUILDDATE := $(shell date -u +%FT%T%z) BUILDDATE := $(shell date -u +%FT%T%z)
BUILDTS := $(shell date -u +%s) BUILDTS := $(shell date -u +%s)
REVISION := $(shell git rev-parse HEAD) REVISION := $(shell git rev-parse HEAD)
VERSION_DEV := 0.4.9-dev$(shell date +%Y%m%d%H%M) VERSION_DEV ?= 0.4.9-dev$(shell date +%Y%m%d%H%M)
VERSION := 0.4.8 VERSION ?= 0.4.8
PROMETHEUS_TAG := github.com/prometheus/common/version PROMETHEUS_TAG := github.com/prometheus/common/version
KVM_PKG_NAME := github.com/jetkvm/kvm KVM_PKG_NAME := github.com/jetkvm/kvm