fix(release): support fix releases on top of a weekly one

`v2026.40.1` matched neither the weekly pattern nor plain semver (2026 is
past the MSI major limit), so a fix release could not be built. Weekly
tags now take an optional patch: Cargo 2026.40.1, MSI 26.40.1, display
2026.40.1 (week zero-padded, as build.rs and the update check expect).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-05 15:58:53 +03:00
1 parent 47eef134cb
commit a3bcded498
4 files changed
+29 -15

No files matched your search

+7 -4
View File
@@ -6,10 +6,13 @@ use std::path::Path;
fn main() {
let version = std::env::var("CARGO_PKG_VERSION").expect("Cargo package version");
let parts: Vec<&str> = version.split('.').collect();
let app_version = if parts.len() == 3 && parts[0].len() == 4
&& parts[0].starts_with("20") && parts[2] == "0"
{
format!("{}.{:02}", parts[0], parts[1].parse::<u32>().expect("week number"))
let app_version = if parts.len() == 3 && parts[0].len() == 4 && parts[0].starts_with("20") {
let week = parts[1].parse::<u32>().expect("week number");
if parts[2] == "0" {
format!("{}.{week:02}", parts[0])
} else {
format!("{}.{week:02}.{}", parts[0], parts[2])
}
} else {
version.clone()
};