mirror of
https://github.com/obra/superpowers.git
synced 2026-04-16 19:08:18 +00:00
remove things we dont need
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
#
|
#
|
||||||
# Sync this superpowers checkout → prime-radiant-inc/openai-codex-plugins.
|
# Sync this superpowers checkout → prime-radiant-inc/openai-codex-plugins.
|
||||||
# Clones the fork fresh into a temp dir, rsyncs upstream content, regenerates
|
# Clones the fork fresh into a temp dir, rsyncs upstream content, regenerates
|
||||||
# the Codex overlay files (.codex-plugin/plugin.json + agents/openai.yaml)
|
# the Codex overlay file (.codex-plugin/plugin.json) inline, commits, pushes a
|
||||||
# inline, commits, pushes a sync branch, and opens a PR.
|
# sync branch, and opens a PR.
|
||||||
# Path/user agnostic — auto-detects upstream from script location.
|
# Path/user agnostic — auto-detects upstream from script location.
|
||||||
#
|
#
|
||||||
# Deterministic: running twice against the same upstream SHA produces PRs with
|
# Deterministic: running twice against the same upstream SHA produces PRs with
|
||||||
@@ -31,8 +31,8 @@ DEFAULT_BASE="main"
|
|||||||
DEST_REL="plugins/superpowers"
|
DEST_REL="plugins/superpowers"
|
||||||
|
|
||||||
# Paths in upstream that should NOT land in the embedded plugin.
|
# Paths in upstream that should NOT land in the embedded plugin.
|
||||||
# Both the Codex-overlay files are here too — they're managed by the
|
# The Codex-overlay file is here too — it's managed by the generate step,
|
||||||
# generate-overlays step, not by rsync.
|
# not by rsync.
|
||||||
EXCLUDES=(
|
EXCLUDES=(
|
||||||
# Dotfiles and infra
|
# Dotfiles and infra
|
||||||
".claude/"
|
".claude/"
|
||||||
@@ -67,13 +67,12 @@ EXCLUDES=(
|
|||||||
"tests/"
|
"tests/"
|
||||||
"tmp/"
|
"tmp/"
|
||||||
|
|
||||||
# Codex-overlay files — regenerated below, not synced
|
# Codex-overlay file — regenerated below, not synced
|
||||||
".codex-plugin/"
|
".codex-plugin/"
|
||||||
"agents/openai.yaml"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Generated overlay files
|
# Generated overlay file
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
# Writes the Codex plugin manifest to "$1" with the given upstream version.
|
# Writes the Codex plugin manifest to "$1" with the given upstream version.
|
||||||
@@ -130,19 +129,6 @@ generate_plugin_json() {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Writes the plugin-level agents/openai.yaml to "$1".
|
|
||||||
# Args: dest_path
|
|
||||||
generate_agents_openai_yaml() {
|
|
||||||
local dest="$1"
|
|
||||||
mkdir -p "$(dirname "$dest")"
|
|
||||||
cat > "$dest" <<'EOF'
|
|
||||||
interface:
|
|
||||||
display_name: "Superpowers"
|
|
||||||
short_description: "Planning, TDD, debugging, and delivery workflows for coding agents"
|
|
||||||
default_prompt: "Use Superpowers to brainstorm a design, write an implementation plan, run test-driven development, debug bugs systematically, or finish and ship a development branch."
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Args
|
# Args
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
@@ -250,7 +236,7 @@ SYNC_BRANCH="sync/superpowers-${UPSTREAM_SHORT}-${TIMESTAMP}"
|
|||||||
git checkout -q -b "$SYNC_BRANCH"
|
git checkout -q -b "$SYNC_BRANCH"
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Build rsync args (excludes only — no protects, overlays are regenerated)
|
# Build rsync args (excludes only — overlay is regenerated separately)
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
RSYNC_ARGS=(-av --delete)
|
RSYNC_ARGS=(-av --delete)
|
||||||
@@ -271,8 +257,8 @@ echo "=== Preview (rsync --dry-run) ==="
|
|||||||
rsync "${RSYNC_ARGS[@]}" --dry-run --itemize-changes "$UPSTREAM/" "$DEST/"
|
rsync "${RSYNC_ARGS[@]}" --dry-run --itemize-changes "$UPSTREAM/" "$DEST/"
|
||||||
echo "=== End preview ==="
|
echo "=== End preview ==="
|
||||||
echo ""
|
echo ""
|
||||||
echo "Overlay files (.codex-plugin/plugin.json, agents/openai.yaml) will be"
|
echo "Overlay file (.codex-plugin/plugin.json) will be regenerated with"
|
||||||
echo "regenerated with version $UPSTREAM_VERSION regardless of rsync output."
|
echo "version $UPSTREAM_VERSION regardless of rsync output."
|
||||||
|
|
||||||
if [[ $DRY_RUN -eq 1 ]]; then
|
if [[ $DRY_RUN -eq 1 ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
@@ -291,9 +277,8 @@ echo ""
|
|||||||
echo "Syncing upstream content..."
|
echo "Syncing upstream content..."
|
||||||
rsync "${RSYNC_ARGS[@]}" "$UPSTREAM/" "$DEST/"
|
rsync "${RSYNC_ARGS[@]}" "$UPSTREAM/" "$DEST/"
|
||||||
|
|
||||||
echo "Regenerating overlay files..."
|
echo "Regenerating overlay file..."
|
||||||
generate_plugin_json "$DEST/.codex-plugin/plugin.json" "$UPSTREAM_VERSION"
|
generate_plugin_json "$DEST/.codex-plugin/plugin.json" "$UPSTREAM_VERSION"
|
||||||
generate_agents_openai_yaml "$DEST/agents/openai.yaml"
|
|
||||||
|
|
||||||
# Bail early if nothing actually changed
|
# Bail early if nothing actually changed
|
||||||
cd "$DEST_REPO"
|
cd "$DEST_REPO"
|
||||||
|
|||||||
Reference in New Issue
Block a user