🐛 fix(thirdparty): preserve manifest during snapshot update

This commit is contained in:
csh
2026-04-01 13:46:54 +08:00
parent 2e26f98687
commit 91b0ea7458
2 changed files with 31 additions and 4 deletions
+12
View File
@@ -80,6 +80,18 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
self.assertTrue((UI_UX_PRO_MAX_DIR / "data").is_dir())
self.assertTrue((UI_UX_PRO_MAX_DIR / "scripts").is_dir())
def test_update_script_materializes_manifest_before_target_checkout(self):
text = UPDATE_SCRIPT.read_text(encoding="utf-8")
self.assertIn('manifest_copy="$tmp_dir/thirdparty_skills.json"', text)
self.assertIn('cp "$MANIFEST_PATH" "$manifest_copy"', text)
self.assertIn('MANIFEST_PATH="$manifest_copy"', text)
self.assertIn('if ! emit_sources_tsv > "$sources_file"; then', text)
self.assertNotIn("done < <(emit_sources_tsv)", text)
self.assertLess(
text.index('cp "$MANIFEST_PATH" "$manifest_copy"'),
text.index('git checkout -B "$TARGET_BRANCH" "origin/$TARGET_BRANCH"'),
)
if __name__ == "__main__":
unittest.main()