packaging: add version numbers and comparison script

This commit is contained in:
Robur 2022-02-25 10:41:43 +00:00
parent 443bcd1a19
commit 8e3eafbad1
2 changed files with 21 additions and 0 deletions

15
packaging/check_versions.sh Executable file
View file

@ -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

6
packaging/versions.txt Normal file
View file

@ -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