Updated app tarball version

Currently, the debian build system produces a debian package version
with the format: "1.0-1.stx.<revision>"

The rules file then parses this deb pkg version at build time
to produce the app tarball version, which always comes up to
be "1.0-1" at this time [1]. This commit changes the app tarball
version calculation so that the resulting tarball version will
be "1.0-<revision>" [2].

This correction is necessary because the application framework
cannot update an app between instances with the same version.

This commit is part of a set of commits updating the app tarball
version calculation to all apps based off of [3].

[1]: /usr/local/share/applications/helm/<APPNAME>-1.0-1.tgz
[2]: /usr/local/share/applications/helm/<APPNAME>-1.0-<N>.tgz

[3]: https://review.opendev.org/c/starlingx/cert-manager-armada-app/+/872628

Test Plan:
pass - build-pkg
pass - tarball version updated

Story: 2010542
Task: 47530

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: I4c983e812501765da54cc07cbb5bceb7c3f94cde
This commit is contained in:
Leonardo Fagundes Luz Serrano 2023-02-25 01:45:04 -03:00
parent f8984796e3
commit 9294b18045

View File

@ -5,11 +5,11 @@ export ROOT = debian/tmp
export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '.')
export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 2 -d '.')
export RELEASE = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-')
export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
export APP_NAME = ptp-notification
export APP_VERSION = $(MAJOR).$(MINOR_PATCH)
export APP_VERSION = $(RELEASE)-$(REVISION)
export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz
export HELM_FOLDER = /usr/lib/helm
export HELM_REPO = stx-platform