fix(launcher,installer): stamp launcher with the release version; stable notes baseline on rebuild
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
edd97b1a3d
commit
fcc68cbdd6
3 changed files with 37 additions and 14 deletions
|
|
@ -38,3 +38,8 @@
|
||||||
- **False "SehTrampoline.dll is STALE" after checkouts/merges:** the check compared file times, and git rewrites
|
- **False "SehTrampoline.dll is STALE" after checkouts/merges:** the check compared file times, and git rewrites
|
||||||
`SehTrampoline.c` (new mtime, same content) on checkout. When the source matches HEAD its last commit
|
`SehTrampoline.c` (new mtime, same content) on checkout. When the source matches HEAD its last commit
|
||||||
time is used instead; local edits still use the file time.
|
time is used instead; local edits still use the file time.
|
||||||
|
- **Launcher showed `0.1.3-x64-prereq-probe` instead of the release:** the SK-era launcher `.csproj` hard-coded
|
||||||
|
`InformationalVersion`, which overrides the `-p:Version` release stamp. Removed; launcher file version
|
||||||
|
0.1.3 -> 0.1.4. The launcher / About now report `2026.10.4.7 (<commit>)`.
|
||||||
|
- Rebuilding the same `-Version` keeps that release's original "changes since" baseline (stored as
|
||||||
|
`changelogSince` in the manifest) instead of diffing against itself.
|
||||||
|
|
|
||||||
|
|
@ -586,13 +586,28 @@ if ($Version -and -not $NoPackage) {
|
||||||
if (Test-Path $lastManifestFile) {
|
if (Test-Path $lastManifestFile) {
|
||||||
try { $prevManifest = Get-Content $lastManifestFile -Raw | ConvertFrom-Json } catch { $prevManifest = $null }
|
try { $prevManifest = Get-Content $lastManifestFile -Raw | ConvertFrom-Json } catch { $prevManifest = $null }
|
||||||
}
|
}
|
||||||
$sinceDate = ""
|
# Baseline for "changes since": a rebuild of the same version reuses that build's baseline;
|
||||||
if ($lastVer -and $lastVer -ne $Version) {
|
# otherwise the previous release's commits, or (no manifest yet) the previous version's date.
|
||||||
$lp = $lastVer.Split('.')
|
function ConvertTo-SinceDate([string]$Ver) {
|
||||||
if ($lp.Count -eq 4) { $sinceDate = '{0:D4}-{1:D2}-{2:D2}' -f [int]$lp[0], [int]$lp[1], [int]$lp[2] }
|
$vp = "$Ver".Split('.')
|
||||||
|
if ($vp.Count -eq 4) { return '{0:D4}-{1:D2}-{2:D2}' -f [int]$vp[0], [int]$vp[1], [int]$vp[2] }
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
$prevRelease = if ($lastVer -ne $Version) { $lastVer } else { "" }
|
||||||
|
$coreSince = ""; $suiteSince = ""; $sinceDate = ""
|
||||||
|
if ($prevManifest -and $prevManifest.version -eq $Version) {
|
||||||
|
$prevRelease = "$($prevManifest.previous)"
|
||||||
|
if ($prevManifest.changelogSince) {
|
||||||
|
$coreSince = "$($prevManifest.changelogSince.rynthCore)"
|
||||||
|
$suiteSince = "$($prevManifest.changelogSince.rynthSuite)"
|
||||||
|
$sinceDate = "$($prevManifest.changelogSince.date)"
|
||||||
|
} else { $sinceDate = ConvertTo-SinceDate $prevRelease }
|
||||||
|
} elseif ($prevManifest) {
|
||||||
|
$coreSince = "$($prevManifest.source.rynthCore.commit)"
|
||||||
|
$suiteSince = "$($prevManifest.source.rynthSuite.commit)"
|
||||||
|
} else {
|
||||||
|
$sinceDate = ConvertTo-SinceDate $prevRelease
|
||||||
}
|
}
|
||||||
$coreSince = if ($prevManifest) { $prevManifest.source.rynthCore.commit } else { "" }
|
|
||||||
$suiteSince = if ($prevManifest) { $prevManifest.source.rynthSuite.commit } else { "" }
|
|
||||||
$notesFrom = @(
|
$notesFrom = @(
|
||||||
@{ Repo = 'RynthCore'; Root = $RepoRoot; Files = (Get-ChangelogFiles $RepoRoot $coreSince $sinceDate) },
|
@{ Repo = 'RynthCore'; Root = $RepoRoot; Files = (Get-ChangelogFiles $RepoRoot $coreSince $sinceDate) },
|
||||||
@{ Repo = 'RynthSuite'; Root = $RynthSuiteRoot; Files = (Get-ChangelogFiles $RynthSuiteRoot $suiteSince $sinceDate) }
|
@{ Repo = 'RynthSuite'; Root = $RynthSuiteRoot; Files = (Get-ChangelogFiles $RynthSuiteRoot $suiteSince $sinceDate) }
|
||||||
|
|
@ -604,7 +619,7 @@ if ($Version -and -not $NoPackage) {
|
||||||
version = $Version
|
version = $Version
|
||||||
release = $release
|
release = $release
|
||||||
builtUtc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
|
builtUtc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
|
||||||
previous = $lastVer
|
previous = $prevRelease
|
||||||
installer = [ordered]@{ file = $setupName; size = (Get-Item (Join-Path $pkgDir $setupName)).Length; sha256 = $setupHash }
|
installer = [ordered]@{ file = $setupName; size = (Get-Item (Join-Path $pkgDir $setupName)).Length; sha256 = $setupHash }
|
||||||
source = [ordered]@{
|
source = [ordered]@{
|
||||||
rynthCore = [ordered]@{ branch = $CoreState.branch; commit = $CoreState.commit; dirty = $CoreState.dirty }
|
rynthCore = [ordered]@{ branch = $CoreState.branch; commit = $CoreState.commit; dirty = $CoreState.dirty }
|
||||||
|
|
@ -612,6 +627,8 @@ if ($Version -and -not $NoPackage) {
|
||||||
}
|
}
|
||||||
components = @($components)
|
components = @($components)
|
||||||
changelog = @($notesFrom | ForEach-Object { $r = $_.Repo; $_.Files | ForEach-Object { "$r/$_" } })
|
changelog = @($notesFrom | ForEach-Object { $r = $_.Repo; $_.Files | ForEach-Object { "$r/$_" } })
|
||||||
|
# Baseline the notes were built from (reused when this version is rebuilt).
|
||||||
|
changelogSince = [ordered]@{ rynthCore = $coreSince; rynthSuite = $suiteSince; date = $sinceDate }
|
||||||
}
|
}
|
||||||
$manifestJson = $manifest | ConvertTo-Json -Depth 6
|
$manifestJson = $manifest | ConvertTo-Json -Depth 6
|
||||||
Write-Utf8 (Join-Path $pkgDir 'release-manifest.json') $manifestJson
|
Write-Utf8 (Join-Path $pkgDir 'release-manifest.json') $manifestJson
|
||||||
|
|
@ -622,7 +639,7 @@ if ($Version -and -not $NoPackage) {
|
||||||
$short = { param($s) if ($s.commit) { "$($s.branch)@$($s.commit.Substring(0,7))$(if ($s.dirty) { ' (uncommitted changes!)' })" } else { 'unknown' } }
|
$short = { param($s) if ($s.commit) { "$($s.branch)@$($s.commit.Substring(0,7))$(if ($s.dirty) { ' (uncommitted changes!)' })" } else { 'unknown' } }
|
||||||
[void]$sb.AppendLine("# RynthCore + RynthSuite $Version")
|
[void]$sb.AppendLine("# RynthCore + RynthSuite $Version")
|
||||||
[void]$sb.AppendLine()
|
[void]$sb.AppendLine()
|
||||||
[void]$sb.AppendLine("Release $release, built $($manifest.builtUtc). Previous release: $(if ($lastVer) { $lastVer } else { 'none recorded' }).")
|
[void]$sb.AppendLine("Release $release, built $($manifest.builtUtc). Previous release: $(if ($prevRelease) { $prevRelease } else { 'none recorded' }).")
|
||||||
[void]$sb.AppendLine("Source: RynthCore $(& $short $CoreState), RynthSuite $(& $short $SuiteState).")
|
[void]$sb.AppendLine("Source: RynthCore $(& $short $CoreState), RynthSuite $(& $short $SuiteState).")
|
||||||
[void]$sb.AppendLine()
|
[void]$sb.AppendLine()
|
||||||
[void]$sb.AppendLine("## Install")
|
[void]$sb.AppendLine("## Install")
|
||||||
|
|
@ -637,7 +654,7 @@ if ($Version -and -not $NoPackage) {
|
||||||
[void]$sb.AppendLine("|---|---|")
|
[void]$sb.AppendLine("|---|---|")
|
||||||
foreach ($c in $components) { [void]$sb.AppendLine("| $($c.name) | $($c.version) |") }
|
foreach ($c in $components) { [void]$sb.AppendLine("| $($c.name) | $($c.version) |") }
|
||||||
[void]$sb.AppendLine()
|
[void]$sb.AppendLine()
|
||||||
[void]$sb.AppendLine("## Changes$(if ($lastVer -and $lastVer -ne $Version) { " since $lastVer" })")
|
[void]$sb.AppendLine("## Changes$(if ($prevRelease) { " since $prevRelease" })")
|
||||||
$anyNotes = $false
|
$anyNotes = $false
|
||||||
foreach ($src in $notesFrom) {
|
foreach ($src in $notesFrom) {
|
||||||
foreach ($rel in $src.Files) {
|
foreach ($rel in $src.Files) {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Launcher assembly version (bump when changing launcher-only behavior). -->
|
<!-- Launcher assembly version (bump when changing launcher-only behavior). Previous: 0.1.3.
|
||||||
<Version>0.1.3</Version>
|
No hard-coded InformationalVersion: release builds pass -p:Version=yyyy.m.d.n, and the
|
||||||
<AssemblyVersion>0.1.3.0</AssemblyVersion>
|
product version derived from it is what the launcher/About show (BuildVersion.Format). -->
|
||||||
<FileVersion>0.1.3.0</FileVersion>
|
<Version>0.1.4</Version>
|
||||||
<InformationalVersion>0.1.3-x64-prereq-probe</InformationalVersion>
|
<AssemblyVersion>0.1.4.0</AssemblyVersion>
|
||||||
|
<FileVersion>0.1.4.0</FileVersion>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net10.0-windows7.0</TargetFramework>
|
<TargetFramework>net10.0-windows7.0</TargetFramework>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue