Skip to content

fix: strip pre-release suffix from version for MSI/WiX#93

Merged
amoghbanta merged 1 commit intomainfrom
fix/msi-version-prerelease
Feb 20, 2026
Merged

fix: strip pre-release suffix from version for MSI/WiX#93
amoghbanta merged 1 commit intomainfrom
fix/msi-version-prerelease

Conversation

@amoghbanta
Copy link
Collaborator

Problem

The release workflow failed when a tag with a pre-release suffix was pushed (e.g. v0.2.1-test1):

failed to bundle project `optional pre-release identifier in app version
must be numeric-only and cannot be greater than 65535 for msi target`

WiX (the Windows MSI bundler used by Tauri) only accepts versions in major.minor.patch format. Any pre-release suffix containing letters (-test1, -rc1, -beta) is rejected.

Fix

Strip the pre-release suffix before writing the version to tauri.conf.json. A new version_msi output holds the clean version (0.2.1-test10.2.1). The git tag and GitHub Release name still use the full original version string.

VERSION_MSI="${VERSION%%-*}"   # 0.2.1-rc1 → 0.2.1

Test plan

  • Push a tag like v0.2.1-rc1 and confirm the MSI build succeeds
  • Confirm the GitHub Release is still tagged v0.2.1-rc1
  • Confirm the installer version shows 0.2.1

WiX requires the app version to be numeric-only (major.minor.patch).
Pre-release tags like v0.2.1-test1 or v0.2.1-rc1 caused the MSI
bundler to fail with 'optional pre-release identifier must be
numeric-only and cannot be greater than 65535'.

Strip the pre-release suffix (e.g. 0.2.1-rc1 → 0.2.1) before
writing to tauri.conf.json. The git tag and GitHub Release name
still use the full version string.
@amoghbanta amoghbanta closed this Feb 20, 2026
@amoghbanta amoghbanta reopened this Feb 20, 2026
@amoghbanta amoghbanta merged commit ab05436 into main Feb 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant