summaryrefslogtreecommitdiffstats
path: root/debian/tests/version
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:34:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:34:55 +0000
commit58306b0f7e29c41c00ab7bbd99d7686299f1de77 (patch)
treeb737b9d2d0a29c485e78c545d5434f13d923c91e /debian/tests/version
parentAdding upstream version 2.13.6. (diff)
downloadicinga2-58306b0f7e29c41c00ab7bbd99d7686299f1de77.tar.xz
icinga2-58306b0f7e29c41c00ab7bbd99d7686299f1de77.zip
Adding debian version 2.13.6-2.debian/2.13.6-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/tests/version18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/tests/version b/debian/tests/version
new file mode 100644
index 0000000..67c93f2
--- /dev/null
+++ b/debian/tests/version
@@ -0,0 +1,18 @@
+#!/bin/bash
+#--------------------
+#Testing for correct version
+#--------------------
+
+set -e
+
+PACKAGE_VERSION="$(dpkg-parsechangelog -S Version |sed -ne 's/^\(\([0-9]\+\):\)\?\(.*\)-.*/\3/p' )"
+ICINGA_VERSION="$(icinga2 --version | grep version: | head -n1 | sed -e 's/.*version: r\([0-9.]\+\).*$/\1/')"
+
+if [ "$ICINGA_VERSION" = "$PACKAGE_VERSION" ]
+then
+ echo "OK: $ICINGA_VERSION is equal to $PACKAGE_VERSION"
+ exit 0
+else
+ echo "ERROR: $ICINGA_VERSION is not equal to $PACKAGE_VERSION"
+ exit 1
+fi