summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdebian/bin/build.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/bin/build.sh b/debian/bin/build.sh
index 51a7914..c8a72f7 100755
--- a/debian/bin/build.sh
+++ b/debian/bin/build.sh
@@ -14,6 +14,14 @@ else
exit 1
fi
+cfgs=( ptxconfigs/*.ptxconfig )
+PTX_VERSION=$(sed -n -e 's/^PTXCONF_PROJECT="OSELAS.Toolchain-\(.*\)"$/\1/p' ${cfgs[0]})
+DEBIAN_VERSION="$(sed -n '1s/.*(\([^-]*\)-.*).*/\1/p' debian/changelog)"
+if [ "${PTX_VERSION}" != "${DEBIAN_VERSION}" ]; then
+ echo "release version from the debian/changelog (${DEBIAN_VERSION}) does not match '${PTX_VERSION}'"
+ exit 1
+fi
+
if ! [[ "${VERSION}" =~ .*/sid ]]; then
git checkout debian/changelog
dch --local ${PREFIX}${VERSION}+ --distribution ${RELEASE} "Rebuild for ${RELEASE}" || exit