🐛 fix(thirdparty): preserve optional manifest fields

This commit is contained in:
ci[bot]
2026-04-01 13:55:55 +08:00
parent 91b0ea7458
commit 33dd5bb6ba
3 changed files with 19 additions and 7 deletions
+11 -5
View File
@@ -18,7 +18,7 @@ with open(sys.argv[1], encoding="utf-8") as fh:
for entry in data["sources"]:
print(
"\t".join(
"\x1f".join(
[
entry["id"],
entry["snapshot_dir"],
@@ -125,7 +125,13 @@ git checkout -B "$TARGET_BRANCH" "origin/$TARGET_BRANCH"
mkdir -p "codex/skills/.sources"
while IFS=$'\t' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir; do
sources_file="$tmp_dir/sources.tsv"
if ! emit_sources_tsv > "$sources_file"; then
echo "ERROR: failed to load third-party manifest: $MANIFEST_PATH" >&2
exit 1
fi
while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir; do
[ -n "$source_id" ] || continue
if [ -f "$source_list" ]; then
@@ -134,10 +140,10 @@ while IFS=$'\t' read -r source_id snapshot_dir sync_mode source_list skills_subd
rm -rf "codex/skills/$name"
done < "$source_list"
fi
done < <(emit_sources_tsv)
done < "$sources_file"
declare -A owners=()
while IFS=$'\t' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir; do
while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir; do
[ -n "$source_id" ] || continue
git archive --format=tar "origin/${THIRDPARTY_BRANCH}" "$snapshot_dir" | tar -xf - -C "$tmp_dir"
@@ -192,7 +198,7 @@ while IFS=$'\t' read -r source_id snapshot_dir sync_mode source_list skills_subd
esac
printf "%s\n" "${names[@]}" | sort > "$source_list"
done < <(emit_sources_tsv)
done < "$sources_file"
git add codex/skills
+2 -2
View File
@@ -81,7 +81,7 @@ with open(sys.argv[1], encoding="utf-8") as fh:
for entry in data["sources"]:
print(
"\t".join(
"\x1f".join(
[
entry["id"],
entry["upstream_repo"],
@@ -124,7 +124,7 @@ if ! emit_sources_tsv > "$sources_file"; then
fi
changed=0
while IFS=$'\t' read -r source_id upstream_repo upstream_ref snapshot_dir sync_mode; do
while IFS=$'\x1f' read -r source_id upstream_repo upstream_ref snapshot_dir sync_mode; do
[ -n "$source_id" ] || continue
gh_repo=""