fix(tauri-build): preserve numeric semver build metadata in Windows FILEVERSION - #15289
Conversation
Package Changes Through 7b81ffbThere are 11 changes which include tauri with minor, @tauri-apps/api with minor, tauri-build with minor, tauri-macos-sign with patch, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-cli with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-plugin with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
cc99658 to
c041010
Compare
|
The semver metadata doesn't directly translate to a revision number in |
|
I agree it's not a strict semantic mapping. |
|
I feel like this behavior could be quite unexpected for many people, although it won't really do any harm. Especially since we don't handle other types of metadata/pre-release data @FabianLars any opinions on this? |
|
hmm i think that's fine? we do a similar conversion in the .msi already |
Legend-Master
left a comment
There was a problem hiding this comment.
Ok, let's do this then
|
Addressed in The build metadata handling now matches the stricter NSIS approach: it must parse as a whole |
a1d29fd to
6ede795
Compare
Legend-Master
left a comment
There was a problem hiding this comment.
You'll also need to run cargo fmt
…ILEVERSION (tauri-apps#15289) * fix(tauri-build): preserve numeric semver build metadata in Windows FILEVERSION * refactor(tauri-build): clarify PRODUCTVERSION naming * refactor(tauri-build): align fixed Windows version fields * refactor(tauri-build): rename Windows version helper * style(tauri-build): move winres helper near tests
…ILEVERSION (tauri-apps#15289) * fix(tauri-build): preserve numeric semver build metadata in Windows FILEVERSION * refactor(tauri-build): clarify PRODUCTVERSION naming * refactor(tauri-build): align fixed Windows version fields * refactor(tauri-build): rename Windows version helper * style(tauri-build): move winres helper near tests
Summary
This PR preserves a numeric semver build identifier in the 4th segment of the Windows
FILEVERSIONfixed field.Today,
tauri-buildprojectsconfig.versioninto the Windows fixed version fields asmajor.minor.patch.0, which means versions such as1.2.3+42always become1.2.3.0even though the numeric build identifier is representable in the Windows 4th segment.This PR keeps the current
major.minor.patchprojection and preserves the build metadata only when it is:u16Otherwise, behavior stays unchanged and the 4th segment remains
0.PRODUCTVERSIONis unchanged.Why this is safe
Verification
cargo test -p tauri-build