Merge PR #247: Generate a version.h file

pull/263/head
Jenkins nymea 2020-01-29 21:44:34 +01:00
commit ace4c70fe4
21 changed files with 64 additions and 18 deletions

View File

@ -23,6 +23,7 @@
#include "nymeasettings.h"
#include "nymeacore.h"
#include "nymeaconfiguration.h"
#include "version.h"
#include <QDir>
#include <QFile>

View File

@ -26,6 +26,7 @@
#include "debugserverhandler.h"
#include "nymeaconfiguration.h"
#include "stdio.h"
#include "version.h"
#include <QXmlStreamWriter>
#include <QCoreApplication>

View File

@ -30,6 +30,7 @@
#include "loggingcategories.h"
#include "typeutils.h"
#include "nymeasettings.h"
#include "version.h"
#include "devices/devicediscoveryinfo.h"
#include "devices/devicepairinginfo.h"

View File

@ -38,6 +38,7 @@
#include "nymeasettings.h"
#include "loggingcategories.h"
#include "version.h"
#include "upnpdiscoveryimplementation.h"
#include "upnpdiscoveryreplyimplementation.h"

View File

@ -48,6 +48,7 @@
#include "ruleengine/ruleengine.h"
#include "loggingcategories.h"
#include "platform/platform.h"
#include "version.h"
#include "devicehandler.h"
#include "actionhandler.h"

View File

@ -4,7 +4,7 @@ TARGET = nymea-core
include(../nymea.pri)
QT += sql qml
INCLUDEPATH += $$top_srcdir/libnymea
INCLUDEPATH += $$top_srcdir/libnymea $$top_builddir
LIBS += -L$$top_builddir/libnymea/ -lnymea -lssl -lcrypto -lnymea-mqtt
target.path = $$[QT_INSTALL_LIBS]

View File

@ -39,6 +39,7 @@
#include "nymeasettings.h"
#include "platform/platform.h"
#include "platform/platformzeroconfcontroller.h"
#include "version.h"
#include "jsonrpc/jsonrpcserverimplementation.h"
#include "servers/mocktcpserver.h"

View File

@ -134,6 +134,7 @@
#include "httpreply.h"
#include "loggingcategories.h"
#include "nymeacore.h"
#include "version.h"
#include <QDateTime>
#include <QPair>

View File

@ -77,6 +77,7 @@
#include "httpreply.h"
#include "httprequest.h"
#include "debugserverhandler.h"
#include "version.h"
#include <QJsonDocument>
#include <QNetworkInterface>

View File

@ -1,20 +1,7 @@
# Parse and export NYMEA_VERSION_STRING
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
# define protocol versions
JSON_PROTOCOL_VERSION_MAJOR=4
JSON_PROTOCOL_VERSION_MINOR=1
LIBNYMEA_API_VERSION_MAJOR=4
LIBNYMEA_API_VERSION_MINOR=0
LIBNYMEA_API_VERSION_PATCH=0
COPYRIGHT_YEAR_FROM=2013
COPYRIGHT_YEAR_TO=2020
DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}\\\" \
COPYRIGHT_YEAR_STRING=\\\"$${COPYRIGHT_YEAR_FROM}-$${COPYRIGHT_YEAR_TO}\\\" \
LIBNYMEA_API_VERSION=\\\"$${LIBNYMEA_API_VERSION_MAJOR}.$${LIBNYMEA_API_VERSION_MINOR}.$${LIBNYMEA_API_VERSION_PATCH}\\\"
DEFINES += COPYRIGHT_YEAR_STRING=\\\"$${COPYRIGHT_YEAR_FROM}-$${COPYRIGHT_YEAR_TO}\\\"
QT *= network websockets bluetooth dbus

View File

@ -1,5 +1,20 @@
include(nymea.pri)
# Parse and export NYMEA_VERSION_STRING
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
# define protocol versions
JSON_PROTOCOL_VERSION_MAJOR=4
JSON_PROTOCOL_VERSION_MINOR=1
JSON_PROTOCOL_VERSION="$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}"
LIBNYMEA_API_VERSION_MAJOR=4
LIBNYMEA_API_VERSION_MINOR=0
LIBNYMEA_API_VERSION_PATCH=0
LIBNYMEA_API_VERSION="$${LIBNYMEA_API_VERSION_MAJOR}.$${LIBNYMEA_API_VERSION_MINOR}.$${LIBNYMEA_API_VERSION_PATCH}"
QMAKE_SUBSTITUTES += version.h.in
TEMPLATE=subdirs
SUBDIRS += libnymea tools

View File

@ -43,6 +43,7 @@
#include "nymeadbusservice.h"
#include "nymeaapplication.h"
#include "loggingcategories.h"
#include "version.h"
using namespace nymeaserver;

View File

@ -40,6 +40,7 @@
#include "nymeacore.h"
#include "nymeasettings.h"
#include "loggingcategories.h"
#include "version.h"
namespace nymeaserver {

View File

@ -3,7 +3,7 @@ include(../nymea.pri)
TARGET = nymead
TEMPLATE = app
INCLUDEPATH += ../libnymea ../libnymea-core
INCLUDEPATH += ../libnymea ../libnymea-core $$top_builddir
target.path = /usr/bin
INSTALLS += target

View File

@ -3,7 +3,8 @@ CONFIG += testcase
INCLUDEPATH += $$top_srcdir/libnymea \
$$top_srcdir/libnymea-core \
$$top_srcdir/tests/testlib/
$$top_srcdir/tests/testlib/ \
$$top_builddir
LIBS += -L$$top_builddir/libnymea/ -lnymea \
-L$$top_builddir/libnymea-core/ -lnymea-core \

View File

@ -22,6 +22,7 @@
#include "nymeatestbase.h"
#include "../../utils/pushbuttonagent.h"
#include "nymeacore.h"
#include "version.h"
#include "servers/mocktcpserver.h"
#include "usermanager/usermanager.h"

View File

@ -19,6 +19,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "nymeatestbase.h"
#include "version.h"
using namespace nymeaserver;

View File

@ -20,6 +20,7 @@
#include "nymeatestbase.h"
#include "nymeacore.h"
#include "version.h"
#include <QWebSocket>

View File

@ -3,7 +3,7 @@ CONFIG += c++11 console
CONFIG -= app_bundle
include(../../nymea.pri)
INCLUDEPATH += $$top_srcdir/libnymea
INCLUDEPATH += $$top_srcdir/libnymea $$top_builddir
LIBS += -L$$top_builddir/libnymea -lnymea
SOURCES += \

View File

@ -21,6 +21,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "plugininfocompiler.h"
#include "version.h"
#include <QJsonObject>
#include <QFile>

29
version.h.in Normal file
View File

@ -0,0 +1,29 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2020 Michael Zanetti <michael.zanetti@nymea.io> *
* *
* This file is part of nymea. *
* *
* nymea is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, version 2 of the License. *
* *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with nymea. If not, see <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef VERSION_H
#define VERSION_H
#define NYMEA_VERSION_STRING '"$$NYMEA_VERSION_STRING"'
#define JSON_PROTOCOL_VERSION '"$$JSON_PROTOCOL_VERSION"'
#define LIBNYMEA_API_VERSION '"$$LIBNYMEA_API_VERSION"'
#endif