Skip to content

Commit

Permalink
Compose RELEASE_SERVICE_VERSION into version number
Browse files Browse the repository at this point in the history
Summary:
version was increased to 0.6 "recently" and not so many changes have been done since them
so asserting the verison number is stuck in the past is a bit too much, but still having it move with
each new release is important for reproducibility of issues, etc. so compromise and append the version at the end

Reviewers: #kde_games

Subscribers: kde-games-devel

Differential Revision: https://phabricator.kde.org/D27751
  • Loading branch information
tsdgeos committed Mar 15, 2020
1 parent 0269973 commit 09c892b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
PROJECT(ksquares)

cmake_minimum_required (VERSION 3.5 FATAL_ERROR)

set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "03")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")

project(ksquares VERSION "0.6.${RELEASE_SERVICE_COMPACT_VERSION}")

set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.30.0")

Expand All @@ -25,6 +32,7 @@ find_package(KF5KDEGames 4.9.0 REQUIRED)
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ set(ksquares_SRCS
scoresdialog.cpp
)

ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KSQUARES VERSION_HEADER ksquares_version.h)

qt5_add_resources(ksquares_SRCS ksquares.qrc)

ki18n_wrap_ui(ksquares_SRCS newgamewidget.ui scoreswidget.ui prefs_ai.ui prefs_display.ui)
Expand Down
5 changes: 2 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
#include "ksquareswindow.h"
#include "ksquaresdemowindow.h"
#include "settings.h"
#include "ksquares_version.h"

static const char description[] =
I18N_NOOP("Take it in turns to draw lines.\nIf you complete a squares, you get another go.");

static const char version[] = "0.6";

int main(int argc, char **argv)
{
QApplication app(argc, argv);
Expand All @@ -35,7 +34,7 @@ int main(int argc, char **argv)
migrate.setUiFiles(QStringList() << QStringLiteral("ksquaresui.rc"));
migrate.migrate();
KLocalizedString::setApplicationDomain("ksquares");
KAboutData about(QStringLiteral("ksquares"), i18n("KSquares"), QLatin1String(version), i18n(description),
KAboutData about(QStringLiteral("ksquares"), i18n("KSquares"), QStringLiteral(KSQUARES_VERSION_STRING), i18n(description),
KAboutLicense::GPL, i18n("(C) 2006-2007 Matt Williams"));
about.addAuthor(i18n("Matt Williams"), i18n("Original creator and maintainer"), QStringLiteral("matt@milliams.com"), QStringLiteral("https://milliams.com"));
about.addCredit(i18n("Fela Winkelmolen"), i18n("Many patches and bugfixes"));
Expand Down

0 comments on commit 09c892b

Please sign in to comment.