From fb702b47e6a19467dac26a241c8e4870362c744d Mon Sep 17 00:00:00 2001 From: Igor Soares Date: Fri, 29 Dec 2023 13:02:52 -0300 Subject: [PATCH] Application versioning based on build release This change will automatically adjust versioning of the application tarball and python plugins to reflect the same version reported by SW_VERION in /etc/build.info. Test plan: PASS: build-pkgs -a & build-image PASS: Confirm that the tarball version matches the platform version PASS: Apply application Story: 2010929 Task: 49358 Change-Id: I6e6ef2e8659258e7a433dea8e24bfbfbe8cd1c49 Signed-off-by: Igor Soares --- .../debian/deb_folder/control | 3 ++- .../debian/deb_folder/rules | 2 +- .../debian/deb_folder/control | 3 ++- stx-intel-device-plugins-operator-helm/debian/deb_folder/rules | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/control b/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/control index 00ff59d..e4f98b5 100644 --- a/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/control +++ b/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/control @@ -7,7 +7,8 @@ Build-Depends: debhelper-compat (= 13), python3-all, python3-pbr, python3-setuptools, - python3-wheel + python3-wheel, + build-info Standards-Version: 4.5.1 Homepage: https://www.starlingx.io diff --git a/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/rules b/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/rules index 4718430..5bde9ed 100644 --- a/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/rules +++ b/python3-k8sapp-intel-device-plugins-operator/debian/deb_folder/rules @@ -5,7 +5,7 @@ export APP_NAME = intel-device-plugins-operator export PYBUILD_NAME = k8sapp_intel_device_plugins_operator export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') -export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') +export MAJOR = $(shell cat /etc/build.info | grep SW_VERSION | cut -d'"' -f2) export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') export PBR_VERSION = $(MAJOR).$(MINOR_PATCH) diff --git a/stx-intel-device-plugins-operator-helm/debian/deb_folder/control b/stx-intel-device-plugins-operator-helm/debian/deb_folder/control index 9f44c76..6b22357 100644 --- a/stx-intel-device-plugins-operator-helm/debian/deb_folder/control +++ b/stx-intel-device-plugins-operator-helm/debian/deb_folder/control @@ -7,7 +7,8 @@ Build-Depends: debhelper-compat (= 13), python3-k8sapp-intel-device-plugins-operator, python3-k8sapp-intel-device-plugins-operator-wheels, intel-device-plugins-qat-helm, - intel-device-plugins-operator-helm + intel-device-plugins-operator-helm, + build-info Standards-Version: 4.5.1 Homepage: https://www.starlingx.io diff --git a/stx-intel-device-plugins-operator-helm/debian/deb_folder/rules b/stx-intel-device-plugins-operator-helm/debian/deb_folder/rules index 3810036..d94c08e 100755 --- a/stx-intel-device-plugins-operator-helm/debian/deb_folder/rules +++ b/stx-intel-device-plugins-operator-helm/debian/deb_folder/rules @@ -5,7 +5,7 @@ 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 RELEASE = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') +export RELEASE = $(shell cat /etc/build.info | grep SW_VERSION | cut -d'"' -f2) export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') export APP_NAME = intel-device-plugins-operator