summaryrefslogtreecommitdiff
path: root/scripts/package-codex-plugin.sh
diff options
context:
space:
mode:
authorDrew Ritter <drew@primeradiant.com>2026-11-03 15:20:42 -0800
committerDrew Ritter <drew@primeradiant.com>2026-11-03 15:20:42 -0800
commit58e107b4824f4cd084ecdc7f3e01c6dd20f9e391 (patch)
treeb9ea88a675416d3407f7ac6096f227da8d4ec035 /scripts/package-codex-plugin.sh
parent22f0b463e7a5e579904dd6211a520321035526f7 (diff)
Fix Codex portal release metadata and hook packagingcodex/wip-codex-marketplace-upload-7.0.2
Drew reported that the v7.0.2 ZIP was rejected for a hooks declaration, a subtitle longer than 30 characters, and a missing support URL. The published main release lacked the fixes carried on the previous marketplace upload branch. Carry forward d19b503b, 6e11b443, and 705a8504: use the approved short subtitle and support URL, and omit only the staged manifest hooks field. Keep hooks: {} in the repository manifest so local installs do not auto-discover the Claude Code SessionStart hook. Preserve the extracted manifest permissions when writing its portal representation. Retain behavioral archive coverage for ZIP and tar.gz, unchanged source metadata, and restrictive umask. Add source-manifest checks for the portal subtitle length/single-line contract and required HTTPS support URL. The archive and source-manifest regressions failed before the fix; all pass after it, as do shellcheck, bash syntax, and diff checks. Build lineage is main/v7.0.2 at 22f0b463, with only these packaging and listing corrections. Drew explicitly required building the replacement ZIP from main before carrying the fixes onto dev. No dev content is part of the release build. Portal validation remains separate from local verification. Tracked in PRI-3439.
Diffstat (limited to 'scripts/package-codex-plugin.sh')
-rwxr-xr-xscripts/package-codex-plugin.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/package-codex-plugin.sh b/scripts/package-codex-plugin.sh
index fe90862..d20a13e 100755
--- a/scripts/package-codex-plugin.sh
+++ b/scripts/package-codex-plugin.sh
@@ -42,6 +42,7 @@ Options:
The archive is rootless: .codex-plugin/, assets/, skills/, README.md, LICENSE,
and CODE_OF_CONDUCT.md sit at the archive root. Source-only repo files, hooks, tests,
docs, and other harness manifests are intentionally not shipped.
+Hook declarations are removed from the packaged manifest for portal submission.
EOF
}
@@ -244,6 +245,13 @@ git -C "$REPO_ROOT" -c tar.umask=0022 archive --format=tar "$REF" -- \
VERSION="$(jq -r '.version // empty' "$STAGE/.codex-plugin/plugin.json")"
[[ -n "$VERSION" ]] || die "could not read version from .codex-plugin/plugin.json"
+# Omit hook declarations from portal packages while retaining the source
+# manifest's suppression of hook discovery for repository installs.
+# Write into the extracted file to preserve its canonical mode.
+manifest_tmp="$WORK_DIR/plugin-manifest.json"
+jq 'del(.hooks)' "$STAGE/.codex-plugin/plugin.json" >"$manifest_tmp"
+cat "$manifest_tmp" >"$STAGE/.codex-plugin/plugin.json"
+
if [[ -z "$OUTPUT" ]]; then
case "$FORMAT" in
zip)