xca/lib/version.cpp
Christian Hohnstädt 7a05d5623d Change versioning schema: drop iteration counter
The patchlevel will be increased by the iteration counter,
which is the number of commits since the most recent annotated tag.

Tagged version 1.2.3 in VERSION will be called "1.2.3"
3 commits later it will be 1.2.6
2021-04-24 23:16:36 +02:00

31 lines
566 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2018 Christian Hohnstaedt.
*
* All rights reserved.
* Compiles much faster than MW_help.cpp
* and needs to get recompiled every time
*/
#ifndef QMAKE
#include "local.h"
#endif
#ifndef NO_COMMITHASH
#include "commithash.h"
#else
#define COMMITHASH ""
#endif
#define VERSION PACKAGE_VERSION
const char *version_str(bool html)
{
if (!COMMITHASH[0])
return html ? "<b>" VERSION "</b>" : VERSION;
return html ?
"<b>" VERSION "-dev</b><br/>commit: <b>" COMMITHASH "</b>" :
VERSION "-dev\ncommit: " COMMITHASH;
}