Files
portieris-armada-app/python3-k8sapp-portieris/debian/deb_folder/rules
Igor Soares 4dcd07bd95 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: 49348

Change-Id: If778a0e80a332ec15636f4f27ed245dfed09e8a3
Signed-off-by: Igor Soares <Igor.PiresSoares@windriver.com>
2023-12-29 12:18:17 -03:00

34 lines
803 B
Makefile
Executable File

#!/usr/bin/make -f
# export DH_VERBOSE = 1
export APP_NAME = portieris
export PYBUILD_NAME = k8sapp-portieris
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -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)
export ROOT = $(CURDIR)/debian/tmp
export SKIP_PIP_INSTALL = 1
%:
dh $@ --with=python3 --buildsystem=pybuild
override_dh_auto_install:
env | sort
python3 setup.py install \
--install-layout=deb \
--root $(ROOT)
python3 setup.py bdist_wheel \
--universal \
-d $(ROOT)/plugins
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
override_dh_auto_test:
PYTHONDIR=$(CURDIR) stestr run