fix(extract): keep committed palette skeletons out of stale cleanup
ci / ci (pull_request) Successful in 4m11s

Extract skips writing *palcus.itp back to source (build regenerates them
from blueprints), but the skip branch never marked the skeleton's target
path as desired, so cleanupStaleFiles deleted the committed
source/palettes/*.itp.json on every extract. Mark the skipped target as
desired so the skeletons survive.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 10:46:42 +02:00
co-authored by Claude Fable 5
parent b47a8a7afd
commit bf9a3e1e33
2 changed files with 89 additions and 1 deletions
+7 -1
View File
@@ -126,8 +126,14 @@ func extractArchiveResources(p *project.Project, archive erf.Archive, desired ma
}
// *palcus.itp are Toolset-generated palette projections; the module
// build regenerates them from source blueprints, so extraction never
// writes them back into source.
// writes them back into source. The committed skeleton still has to
// survive stale cleanup, so mark its target as desired.
if ext == "itp" && isPaletteProjectionResref(resource.Name) {
effective := p.EffectiveConfig()
target, err := extractionTarget(p, "paths.source", effective.Paths.Source, p.SourceDir(), sourceSubdir(ext), strings.ToLower(resource.Name)+"."+ext+".json")
if err == nil {
desired[target] = struct{}{}
}
skippedCount++
continue
}