fix(extract): keep committed palette skeletons out of stale cleanup
ci / ci (pull_request) Successful in 4m11s
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user