Skip to content

Commit

Permalink
Issue #92 Bump version number and switch to 3-part version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
oktal3700 committed Jan 3, 2022
1 parent 8f11e42 commit 855c97b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 27 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions default.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"version": {
"major": 0,
"minor": 9,
"micro": 9
"minor": 10
},
"libs": {
"blackcore": true,
Expand Down
4 changes: 2 additions & 2 deletions installer/installbuilder/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
10 changes: 5 additions & 5 deletions installer/installbuilder/swift-pilotclient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
5 changes: 2 additions & 3 deletions mkspecs/features/version.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 2 additions & 4 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ def __get_swift_version_base(self):
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()
Expand All @@ -239,8 +238,7 @@ def __get_rev_count(self):
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
Expand Down
4 changes: 2 additions & 2 deletions src/blackconfig/buildconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions src/blackconfig/buildconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/blackconfig/buildconfig_gen.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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); }

0 comments on commit 855c97b

Please sign in to comment.