check that version numbers agree

This commit is contained in:
Gambhiro 2015-12-18 17:43:37 +00:00
parent dca47ac5c9
commit c6ff23fc9a

View File

@ -17,7 +17,26 @@ Options:
--unsigned"
PROJECT=fractorium
VERSION=$(cat ./debian/changelog | head -n 1 | sed 's/^'$PROJECT' (\([^-]\+\)-.*/\1/')
changelogVersion=$(cat ./debian/changelog | head -n 1 | sed 's/^'$PROJECT' (\([^-]\+\)-.*/\1/')
emberVersion=$(grep '#define EMBER_VERSION' ./Source/Ember/EmberDefines.h | sed 's/^.*EMBER_VERSION "\([^"]\+\)".*/\1/')
a=$(echo -n "$changelogVersion" | sed 's/[a-z]//g')
b=$(echo -n "$emberVersion" | sed 's/[a-z]//g')
if [[ "$a" != "$b" ]]; then
echo "Error: Different version numbers were found. Please update the correct file,
the version numbers should agree up to the digits in:
$changelogVersion
$emberVersion
./debian/changelog : $a
./Source/Ember/EmberDefines.h : $b"
exit 2
fi
VERSION=$changelogVersion
PROJECT_ROOT=$PWD
PPA_DIR="$HOME/PPA/$PROJECT-$VERSION"
TAR_NAME="$PROJECT-$VERSION.tar.gz"