parse version from debian changelog, align package and jsonrpc api version

This commit is contained in:
Michael Zanetti 2014-05-04 01:34:29 +02:00
parent aa79e9d5a0
commit ab4a340e27
4 changed files with 9 additions and 10 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
guh (0.1) trusty; urgency=low
guh (0.1.1) trusty; urgency=low
* Initial release.

View File

@ -1,6 +1,4 @@
guh_version_major = 0
guh_version_minor = 0
guh_version_patch = 1
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
coverage {
message("Building coverage.")
@ -9,7 +7,4 @@ coverage {
QMAKE_LFLAGS += -fprofile-arcs
}
DEFINES += GUH_VERSION_MAJOR=$$guh_version_major
DEFINES += GUH_VERSION_MINOR=$$guh_version_minor
DEFINES += GUH_VERSION_PATCH=$$guh_version_patch
DEFINES += GUH_VERSION_STRING=\\\"$${guh_version_major}.$${guh_version_minor}.$${guh_version_patch}\\\"
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\"

View File

@ -1,4 +1,4 @@
0.0.1
0.1.1
{
"methods": {
"Actions.ExecuteAction": {

View File

@ -94,7 +94,11 @@ void TestVersioning::apiChangeBumpsVersion()
p.waitForFinished();
qDebug() << p.readAll();
QVERIFY2(false, QString("JSONRPC API has changed. Update %1.").arg(oldFilePath).toLatin1().data());
if (oldVersion != newVersion && oldApi == newApi) {
QVERIFY2(false, QString("Version has changed. Update %1.").arg(oldFilePath).toLatin1().data());
} else {
QVERIFY2(false, QString("JSONRPC API has changed. Update %1.").arg(oldFilePath).toLatin1().data());
}
}
#include "testversioning.moc"