Issue #92 Bump version number and switch to 3-part version numbers

This commit is contained in:
Mat Sutcliffe
2021-02-17 23:38:28 +00:00
parent 8f11e42b15
commit 855c97bc88
9 changed files with 19 additions and 27 deletions

View File

@@ -14,8 +14,8 @@ such as VATSIM, supporting the following simulators and operating systems:
Downloads
=========
[![Beta version](https://img.shields.io/endpoint?url=https%3A%2F%2Frunkit.io%2Foktal3700%2Flatest-swift%2Fbranches%2Fmaster)][1]
[![Alpha version](https://img.shields.io/endpoint?url=https%3A%2F%2Frunkit.io%2Foktal3700%2Flatest-swift%2Fbranches%2Fmaster%2F%3Fprerelease%3Dtrue)][2]
[![Beta version](https://img.shields.io/github/v/release/swift-project/pilotclient?sort=semver)][1]
[![Alpha version](https://img.shields.io/github/v/release/swift-project/pilotclient?include_prereleases&sort=semver)][2]
[1]: https://github.com/swift-project/pilotclient/releases/latest
[2]: https://github.com/swift-project/pilotclient/releases
@@ -34,13 +34,13 @@ Contributing
_swift_ is written in modern C++17 using the Qt framework.
[![Development version](https://img.shields.io/badge/version-0.9.9-blue)](.)
[![Build status](https://img.shields.io/github/workflow/status/swift-project/pilotclient/Build%20swift/develop/0.9.9)][3]
[![Development version](https://img.shields.io/badge/version-0.10-blue)](.)
[![Build status](https://img.shields.io/github/workflow/status/swift-project/pilotclient/Build%20swift/develop/0.10)][3]
[3]: https://github.com/swift-project/pilotclient/actions
Pull requests should be made against the current active development branch,
which is `develop/0.9.9`.
which is `develop/0.10`.
[:blue_book: Developer guide](https://docs.swift-project.org/doku.php?id=developer_documentation)

View File

@@ -1,8 +1,7 @@
{
"version": {
"major": 0,
"minor": 9,
"micro": 9
"minor": 10
},
"libs": {
"blackcore": true,

View File

@@ -304,10 +304,10 @@ https://swift-project.org/</text>
<osxUninstallerApplicationBundleIcon>../images/swiftinstaller.icns</osxUninstallerApplicationBundleIcon>
<outputDirectory>.</outputDirectory>
<productDisplayIcon>${installdir}/share/icons/swiftinstaller.ico</productDisplayIcon>
<productDisplayName>${product_fullname} ${project.version} ${architecture}bit</productDisplayName>
<productDisplayName>${product_fullname} ${project.version} (${architecture}bit)</productDisplayName>
<requestedExecutionLevel>highestAvailable</requestedExecutionLevel>
<saveRelativePaths>1</saveRelativePaths>
<startMenuGroupName>swift ${project.version} ${architecture}bit</startMenuGroupName>
<startMenuGroupName>swift ${project.version} (${architecture}bit)</startMenuGroupName>
<vendor>swift Project</vendor>
<windowsExecutableIcon>../images/swiftinstaller.ico</windowsExecutableIcon>

View File

@@ -209,7 +209,7 @@ This installs the binaries to run all swift applications.</detailedDescription>
<startMenuShortcutList>
<startMenuShortcut>
<comment>Run swiftgui</comment>
<name>swiftgui ${project.version} ${architecture}bit</name>
<name>swiftgui ${project.version} (${architecture}bit)</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/bin/swiftguistd.exe</windowsExec>
@@ -219,7 +219,7 @@ This installs the binaries to run all swift applications.</detailedDescription>
</startMenuShortcut>
<startMenuShortcut>
<comment>Run swiftcore</comment>
<name>swiftcore ${project.version} ${architecture}bit</name>
<name>swiftcore ${project.version} (${architecture}bit)</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/bin/swiftcore.exe</windowsExec>
@@ -229,7 +229,7 @@ This installs the binaries to run all swift applications.</detailedDescription>
</startMenuShortcut>
<startMenuShortcut>
<comment>Run swiftdata</comment>
<name>swiftdata ${project.version} ${architecture}bit</name>
<name>swiftdata ${project.version} (${architecture}bit)</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/bin/swiftdata.exe</windowsExec>
@@ -239,7 +239,7 @@ This installs the binaries to run all swift applications.</detailedDescription>
</startMenuShortcut>
<startMenuShortcut>
<comment>Run swiftlauncher</comment>
<name>swiftlauncher ${project.version} ${architecture}bit</name>
<name>swiftlauncher ${project.version} (${architecture}bit)</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/bin/swiftlauncher.exe</windowsExec>
@@ -249,7 +249,7 @@ This installs the binaries to run all swift applications.</detailedDescription>
</startMenuShortcut>
<startMenuShortcut>
<comment>Uninstall swift</comment>
<name>Uninstall swift ${project.version} ${architecture}bit</name>
<name>Uninstall swift ${project.version} (${architecture}bit)</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/uninstall.exe</windowsExec>

View File

@@ -8,18 +8,17 @@ defineReplace(gitRevCount) {
for(sha, CONFIG_LOG) {
jsonBlob = $$system(git show $${sha}:../../default.json)
parseJson(jsonBlob, jsonData)
v = $${jsonData.version.major}.$${jsonData.version.minor}.$${jsonData.version.micro}
v = $${jsonData.version.major}.$${jsonData.version.minor}
equals(v, $$swiftConfig(version.full)): BASE_COMMIT = $$sha
}
isEmpty(BASE_COMMIT): warning(Failed to find commit that changed version number to '$$swiftConfig(version.full)')
return($$system(git rev-list --count HEAD $$system_quote(^$$BASE_COMMIT)))
}
setSwiftConfig(version.full, $$swiftConfig(version.major).$$swiftConfig(version.minor).$$swiftConfig(version.micro))
setSwiftConfig(version.full, $$swiftConfig(version.major).$$swiftConfig(version.minor))
VER_MAJ = $$swiftConfig(version.major)
VER_MIN = $$swiftConfig(version.minor)
VER_PAT = $$swiftConfig(version.micro)
VERSION = $$swiftConfig(version.full)
!qtc_run: !isEmpty(GIT_BIN) {

View File

@@ -228,8 +228,7 @@ class Builder:
f.close()
version_major = config_json['version']['major']
version_minor = config_json['version']['minor']
version_micro = config_json['version']['micro']
return '.'.join([str(version_major), str(version_minor), str(version_micro)])
return '.'.join([str(version_major), str(version_minor)])
def __get_rev_count(self):
this_version = self.__get_swift_version_base()
@@ -239,8 +238,7 @@ class Builder:
config_json = json.loads(json_data.decode("utf-8"))
version_major = config_json['version']['major']
version_minor = config_json['version']['minor']
version_micro = config_json['version']['micro']
if this_version == '.'.join([str(version_major), str(version_minor), str(version_micro)]):
if this_version == '.'.join([str(version_major), str(version_minor)]):
base_commit = sha
else:
break

View File

@@ -170,7 +170,7 @@ namespace BlackConfig
const QVersionNumber &CBuildConfig::getVersion()
{
static const QVersionNumber v { versionMajor(), versionMinor(), versionMicro(), versionRevision() };
static const QVersionNumber v { versionMajor(), versionMinor(), versionRevision() };
return v;
}
@@ -182,7 +182,7 @@ namespace BlackConfig
const QString &CBuildConfig::getShortVersionString()
{
static const QVersionNumber v { versionMajor(), versionMinor(), versionMicro() };
static const QVersionNumber v { versionMajor(), versionMinor() };
static const QString s(v.toString());
return s;
}

View File

@@ -160,9 +160,6 @@ namespace BlackConfig
static constexpr int versionMinor(); // defined in buildconfig_gen.inc.in
//! Patch version
static constexpr int versionMicro(); // defined in buildconfig_gen.inc.in
//! Revision version
static int versionRevision(); // defined in buildconfig_gen.cpp.in
};
} // ns

View File

@@ -112,4 +112,3 @@ constexpr bool BlackConfig::CBuildConfig::isVatsimVersion()
constexpr int BlackConfig::CBuildConfig::versionMajor() { return $$swiftConfig(version.major); }
constexpr int BlackConfig::CBuildConfig::versionMinor() { return $$swiftConfig(version.minor); }
constexpr int BlackConfig::CBuildConfig::versionMicro() { return $$swiftConfig(version.micro); }