Joshua Kraitberg aba5069d7f Auto-increment chart versions
Enable auto-versioning of helm charts to ensure the FluxCD
helm controller recognizes chart changes.

Test Plan:
PASS: Build all packages generating an application tarball verifying
      all versions on the charts and application make sense.
PASS: Introduce temporary chart changes and ensure that the versions
      increment as expected.
PASS: Validate basic application lifecycle operations:
      upload/apply/remove/delete.

Story: 2010929
Task: 50383
Change-Id: Ie57ea4a4f5a04f09c14a8855e6c1afdfd7dbccb8
Signed-off-by: Joshua Kraitberg <joshua.kraitberg@windriver.com>
2024-07-12 15:55:17 -04:00

28 lines
788 B
Makefile
Executable File

#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
export PATCH_VERSION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
export CHART_BASE_VERSION = $(shell echo $(DEB_VERSION) | sed 's/-/./' | cut -d '.' -f 1-3)
export CHART_VERSION = v$(CHART_BASE_VERSION)+STX.$(PATCH_VERSION)
export ROOT = debian/tmp
export APP_FOLDER = $(ROOT)/usr/lib/helm
%:
dh $@
override_dh_auto_build:
mkdir -p oran-o2
# Extract oran-o2 chart
tar -C oran-o2 --strip-components 2 -xvf pti-o2.tgz pti-o2/charts
make CHART_VERSION=$(CHART_VERSION) oran-o2
ls -alR
override_dh_auto_install:
# Install the app tar file.
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 oran-o2*.tgz $(APP_FOLDER)
override_dh_auto_test: