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
|
||||
`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.
|
||||
- **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) {
|
||||
try { $prevManifest = Get-Content $lastManifestFile -Raw | ConvertFrom-Json } catch { $prevManifest = $null }
|
||||
}
|
||||
$sinceDate = ""
|
||||
if ($lastVer -and $lastVer -ne $Version) {
|
||||
$lp = $lastVer.Split('.')
|
||||
if ($lp.Count -eq 4) { $sinceDate = '{0:D4}-{1:D2}-{2:D2}' -f [int]$lp[0], [int]$lp[1], [int]$lp[2] }
|
||||
# Baseline for "changes since": a rebuild of the same version reuses that build's baseline;
|
||||
# otherwise the previous release's commits, or (no manifest yet) the previous version's date.
|
||||
function ConvertTo-SinceDate([string]$Ver) {
|
||||
$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 = @(
|
||||
@{ Repo = 'RynthCore'; Root = $RepoRoot; Files = (Get-ChangelogFiles $RepoRoot $coreSince $sinceDate) },
|
||||
@{ Repo = 'RynthSuite'; Root = $RynthSuiteRoot; Files = (Get-ChangelogFiles $RynthSuiteRoot $suiteSince $sinceDate) }
|
||||
|
|
@ -604,7 +619,7 @@ if ($Version -and -not $NoPackage) {
|
|||
version = $Version
|
||||
release = $release
|
||||
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 }
|
||||
source = [ordered]@{
|
||||
rynthCore = [ordered]@{ branch = $CoreState.branch; commit = $CoreState.commit; dirty = $CoreState.dirty }
|
||||
|
|
@ -612,6 +627,8 @@ if ($Version -and -not $NoPackage) {
|
|||
}
|
||||
components = @($components)
|
||||
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
|
||||
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' } }
|
||||
[void]$sb.AppendLine("# RynthCore + RynthSuite $Version")
|
||||
[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()
|
||||
[void]$sb.AppendLine("## Install")
|
||||
|
|
@ -637,7 +654,7 @@ if ($Version -and -not $NoPackage) {
|
|||
[void]$sb.AppendLine("|---|---|")
|
||||
foreach ($c in $components) { [void]$sb.AppendLine("| $($c.name) | $($c.version) |") }
|
||||
[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
|
||||
foreach ($src in $notesFrom) {
|
||||
foreach ($rel in $src.Files) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Launcher assembly version (bump when changing launcher-only behavior). -->
|
||||
<Version>0.1.3</Version>
|
||||
<AssemblyVersion>0.1.3.0</AssemblyVersion>
|
||||
<FileVersion>0.1.3.0</FileVersion>
|
||||
<InformationalVersion>0.1.3-x64-prereq-probe</InformationalVersion>
|
||||
<!-- Launcher assembly version (bump when changing launcher-only behavior). Previous: 0.1.3.
|
||||
No hard-coded InformationalVersion: release builds pass -p:Version=yyyy.m.d.n, and the
|
||||
product version derived from it is what the launcher/About show (BuildVersion.Format). -->
|
||||
<Version>0.1.4</Version>
|
||||
<AssemblyVersion>0.1.4.0</AssemblyVersion>
|
||||
<FileVersion>0.1.4.0</FileVersion>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net10.0-windows7.0</TargetFramework>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
|
|
|
|||
Loading…
Reference in a new issue