From 8e3eafbad1cb48f5f0bfc1688d49f1e10b64b9e5 Mon Sep 17 00:00:00 2001 From: Robur Date: Fri, 25 Feb 2022 10:41:43 +0000 Subject: [PATCH] packaging: add version numbers and comparison script --- packaging/check_versions.sh | 15 +++++++++++++++ packaging/versions.txt | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100755 packaging/check_versions.sh create mode 100644 packaging/versions.txt diff --git a/packaging/check_versions.sh b/packaging/check_versions.sh new file mode 100755 index 0000000..9f5784f --- /dev/null +++ b/packaging/check_versions.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +while read version_a version_b; do + version_a=$(echo $version_a | sed -e 's/-/./g') + version_b=$(echo $version_b | sed -e 's/-/./g') + printf "%s %s %s\n" "$version_a" $(pkg version -t "$version_a" "$version_b") "$version_b" +done < versions.txt + +while read version_a version_b; do + if dpkg --compare-versions "$version_a" lt "$version_b"; then + echo "$version_a < $version_b" + else + echo "$version_a >= $version_b" + fi +done < versions.txt diff --git a/packaging/versions.txt b/packaging/versions.txt new file mode 100644 index 0000000..920997b --- /dev/null +++ b/packaging/versions.txt @@ -0,0 +1,6 @@ +2.0.0-20220202-abcdef 2.0.1-20220203-123456 +2.0.0-10-gabcdef-20220202-hahh 2.0.0-10-gabcdef-20220203-hahh +2.0.0-10-gabcdef-20220202-hahh 2.0.0-11-g123456-20220201-abcd +2.0.0-10-gabcdef-20220202-hahh 2.0.0-110-g123456-20220201-abcd +2.0.0-11-g123456-20220201-abcd 2.0.1-20220120-abcd +3.0-20230101-abcd 3.0.1-20230204-bdbd