From 3dd2d26d86a7429fa09ef6aa34fc532de17f178a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boucher?= Date: Fri, 2 May 2025 13:08:04 -0400 Subject: [PATCH] versioning: add build version to snap packaging GitLab: #2045 Change-Id: I173342d3b9351644a4bad4f70e033d29f06a6cd8 --- extras/packaging/gnu-linux/rules/snap/jami/snapcraft.yaml | 3 ++- extras/packaging/gnu-linux/scripts/build-package-snap.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extras/packaging/gnu-linux/rules/snap/jami/snapcraft.yaml b/extras/packaging/gnu-linux/rules/snap/jami/snapcraft.yaml index e188870c..c96e6c48 100644 --- a/extras/packaging/gnu-linux/rules/snap/jami/snapcraft.yaml +++ b/extras/packaging/gnu-linux/rules/snap/jami/snapcraft.yaml @@ -293,7 +293,8 @@ parts: cmake .. -DENABLE_LIBWRAP=true \ -DLIBJAMI_BUILD_DIR=$SNAPCRAFT_PART_BUILD/daemon/src \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_VERSION=BUILD_VERSION_PLACEHOLDER make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT DESTDIR=$SNAPCRAFT_PART_INSTALL make install build-packages: diff --git a/extras/packaging/gnu-linux/scripts/build-package-snap.sh b/extras/packaging/gnu-linux/scripts/build-package-snap.sh index a3b9fba2..6e498f2c 100755 --- a/extras/packaging/gnu-linux/scripts/build-package-snap.sh +++ b/extras/packaging/gnu-linux/scripts/build-package-snap.sh @@ -29,6 +29,9 @@ cp -r extras/packaging/gnu-linux/rules/snap/${SNAP_PKG_NAME}/snapcraft.yaml . # set the version and tarball filename sed -i "s/RELEASE_VERSION/${RELEASE_VERSION}/g" snapcraft.yaml +# set the build version of the app +sed -i "s/BUILD_VERSION_PLACEHOLDER/${BUILD_VERSION}/g" snapcraft.yaml + snapcraft # requires snapcraft >= 4.8 # move the built snap to output