summaryrefslogtreecommitdiffstats
path: root/MultiMCVersion.h
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-01 14:27:36 -0600
committerAndrew <forkk@forkk.net>2013-12-01 14:27:36 -0600
commit2427ad687137bbcfc7303a931d7e0b74d5325e48 (patch)
tree41eba6ced45761278f137eaf86b0f1da3c60996c /MultiMCVersion.h
parenteff38858ef32239cd91044295ce7db3def857339 (diff)
downloadMultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar
MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar.gz
MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar.lz
MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar.xz
MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.zip
Rework MultiMC's versioning system
Diffstat (limited to 'MultiMCVersion.h')
-rw-r--r--MultiMCVersion.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/MultiMCVersion.h b/MultiMCVersion.h
index 70a2259e..863976b2 100644
--- a/MultiMCVersion.h
+++ b/MultiMCVersion.h
@@ -28,36 +28,43 @@ struct MultiMCVersion
*/
QString toString() const
{
- return QString("%1.%2.%3.%4").arg(
- QString::number(major),
- QString::number(minor),
- QString::number(revision),
- QString::number(build));
+ QString vstr = QString("%1.%2").arg(
+ QString::number(major),
+ QString::number(minor));
+
+ if (build > 0) vstr += QString(".%1").arg(QString::number(build));
+ if (!buildType.isEmpty()) vstr += QString("-%1").arg(buildType);
+
+ return vstr;
}
/*!
* \brief The major version number.
- * For MultiMC 5, this will always be 5.
+ * This is no longer going to always be 5 for MultiMC 5. Doing so is useless.
+ * Instead, we'll be starting major off at 1 and incrementing it with every major feature.
*/
int major;
/*!
* \brief The minor version number.
- * This number is incremented when major features are added.
+ * This number is incremented for major features and bug fixes.
*/
int minor;
/*!
- * \brief The revision number.
- * This number is incremented for bugfixes and small features.
- */
- int revision;
-
- /*!
* \brief The build number.
- * This number is automatically set by Jenkins. It is incremented every time
- * a new build is run.
+ * This number is automatically set by Buildbot it is set to the build number of the buildbot
+ * build that this build came from.
+ * If this build didn't come from buildbot and no build number was given to CMake, this will default
+ * to -1, causing it to not show in this version's string representation.
*/
int build;
+
+ /*!
+ * \brief The build type.
+ * This indicates the type of build that this is. For example, lin64-stable.
+ * Usually corresponds to this build's buildbot builder name.
+ */
+ QString buildType;
};