version.mk: introduce prplOS Git based versioning

Henceforth, we will utilize the prplOS version throughout the
development cycle, determined by the output of the `git describe`
command. The version will be composed of:

 - The fixed version number of the upcoming release currently in
   development.

 - The abbreviated (8 characters) object hash of the most recent commit.

For instance, with the ongoing development of prplOS version 3.0.0 and
having the Git hash `5a2a69d`, the resulting version would be
`3.0.0-5a2a69d`.

References: PCF-691
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit d2499f3e10aa6a8982122c0def4dc7997bbc1753)
This commit is contained in:
Petr Štetiar 2023-10-01 06:00:32 +00:00 committed by Petr Štetiar
parent a916e98685
commit 3ad99311e3
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -22,8 +22,10 @@ PKG_CONFIG_DEPENDS += \
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_PRPLOS:=$(if $(VERSION_PRPLOS),$(VERSION_PRPLOS),$(shell $(TOPDIR)/scripts/prplos_version.sh))
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10-SNAPSHOT)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),$(VERSION_PRPLOS))
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))