Skip to content

Commit 89b935d

Browse files
committed
fix: prevent duplicate path prefixes and consolidate shared file updates
PowerShell release script: - Add deduplication pass to Rewrite-Paths function - Prevents .specify.specify/ double prefixes in generated commands - Matches bash script behavior with regex '(?:\.specify/){2,}' -> '.specify/' Bash update-agent-context script: - Consolidate AGENTS.md updates to single call - Remove redundant calls for $AMP_FILE, $KIRO_FILE, $BOB_FILE, $FORGE_FILE - Update label to 'Codex/opencode/Amp/Kiro/Bob/Pi/Forge' to reflect all agents - Prevents always-deduped $FORGE_FILE call that never executed Both fixes improve efficiency and correctness while maintaining parity between bash and PowerShell implementations.
1 parent 794d421 commit 89b935d

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

.github/workflows/scripts/create-release-packages.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function Rewrite-Paths {
6464
$Content = $Content -replace '(/?)\bmemory/', '.specify/memory/'
6565
$Content = $Content -replace '(/?)\bscripts/', '.specify/scripts/'
6666
$Content = $Content -replace '(/?)\btemplates/', '.specify/templates/'
67+
$Content = $Content -replace '(?:\.specify/){2,}', '.specify/'
6768
return $Content
6869
}
6970

scripts/bash/update-agent-context.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,7 @@ update_all_existing_agents() {
743743
_update_if_new "$COPILOT_FILE" "GitHub Copilot" || _all_ok=false
744744
_update_if_new "$CURSOR_FILE" "Cursor IDE" || _all_ok=false
745745
_update_if_new "$QWEN_FILE" "Qwen Code" || _all_ok=false
746-
_update_if_new "$AGENTS_FILE" "Codex/opencode" || _all_ok=false
747-
_update_if_new "$AMP_FILE" "Amp" || _all_ok=false
748-
_update_if_new "$KIRO_FILE" "Kiro CLI" || _all_ok=false
749-
_update_if_new "$BOB_FILE" "IBM Bob" || _all_ok=false
746+
_update_if_new "$AGENTS_FILE" "Codex/opencode/Amp/Kiro/Bob/Pi/Forge" || _all_ok=false
750747
_update_if_new "$WINDSURF_FILE" "Windsurf" || _all_ok=false
751748
_update_if_new "$JUNIE_FILE" "Junie" || _all_ok=false
752749
_update_if_new "$KILOCODE_FILE" "Kilo Code" || _all_ok=false
@@ -761,7 +758,6 @@ update_all_existing_agents() {
761758
_update_if_new "$KIMI_FILE" "Kimi Code" || _all_ok=false
762759
_update_if_new "$TRAE_FILE" "Trae" || _all_ok=false
763760
_update_if_new "$IFLOW_FILE" "iFlow CLI" || _all_ok=false
764-
_update_if_new "$FORGE_FILE" "Forge" || _all_ok=false
765761

766762
# If no agent files exist, create a default Claude file
767763
if [[ "$_found_agent" == false ]]; then

0 commit comments

Comments
 (0)