feat: complete semantic versioning — qmake VERSION var + setApplicationVersion#110
Conversation
Co-authored-by: MaximumTrainer <1376575+MaximumTrainer@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Completes the app’s semantic-version plumbing by ensuring the qmake project VERSION is set (for Windows executable version metadata) and that QCoreApplication::applicationVersion() is populated at runtime from the existing build-time version source.
Changes:
- Derive qmake
VERSIONfromGIT_VERSIONto drive Windows RC/.exe “Details” version fields. - Set
QCoreApplication::setApplicationVersion(Environnement::getVersion())during early app initialization.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| PowerVelo.pro | Adds logic to compute and assign qmake VERSION from git describe output for Windows version metadata. |
| src/app/globalvars.cpp | Sets Qt application version at startup using Environnement::getVersion(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| # git-describe suffix (e.g. "-14-gabcdef") is removed, leaving "MAJOR.MINOR.PATCH". | ||
| NUMERIC_VERSION = $$replace(GIT_VERSION, ^[vV], "") | ||
| NUMERIC_VERSION = $$section(NUMERIC_VERSION, -, 0, 0) | ||
| isEmpty(NUMERIC_VERSION): NUMERIC_VERSION = "0.0.0" |
|
@copilot fix the failing windows build "LINK : fatal error LNK1117: syntax error in option 'VERSION:21ab926' This error indicates that the /VERSION option provided to the linker is not in the expected format. According to Microsoft documentation, the /VERSION switch expects a numeric value in the form: major[.minor], such as /VERSION:1.0." |
Co-authored-by: MaximumTrainer <1376575+MaximumTrainer@users.noreply.github.com>
Fixed in 7f8bd45. The issue was that The fix adds a !contains(NUMERIC_VERSION, ^[0-9]+\\.[0-9]+): NUMERIC_VERSION = "0.0.0" |
The versioning system was missing two pieces: the Windows
.exemetadata version (visible in file Properties → Details) andQCoreApplication::applicationVersion()returning the actual build version at runtime.The async GitHub update-check flow (
VersionDAO→DialogLogin→UpdateDialog), semantic version comparison (Util::isVersionNewer), andAPP_VERSIONmacro injection from git tags were already fully implemented.Changes
PowerVelo.pro— Derives qmake'sVERSIONvariable fromGIT_VERSIONby stripping the leadingvand anygit describesuffix (e.g.v1.2.3-14-gabcdef→1.2.3). qmake uses this to auto-generate the Windows RC file that populates the.exeDetails tab.src/app/globalvars.cpp— CallsQCoreApplication::setApplicationVersion(Environnement::getVersion())alongside the existingsetOrganizationName/setApplicationNamecalls, soQCoreApplication::applicationVersion()returns the correct version throughout the app lifecycle.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.