File: check_version

package info (click to toggle)
imediff 3.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 820 kB
  • sloc: python: 6,397; sh: 904; xml: 336; makefile: 28
file content (12 lines) | stat: -rwxr-xr-x 507 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh -e
UPSTREAM_VERSION="$(sed -n -e 's/__version__ *= *"\([0-9.]*\)"/\1/p' src/imediff/__init__.py)"
DEB_VERSION="$(dpkg-parsechangelog -S version | sed -e 's/-.[^-]*$//')"
echo "I: $UPSTREAM_VERSION -- upstream version in src/imediff/__init__.py"
echo "I: $DEB_VERSION -- debian version in debian/changelog"
if [ "$UPSTREAM_VERSION" = "$DEB_VERSION" ]; then
	echo "I: VERSION MATCHED -- GOOD"
else
	echo "E: VERSION NON-MATCH -- BAD"
  echo "E:  >>> Fix debian/changelog file with 'dch'"
	exit 1
fi