crosscode: Accounts' own PM2 config no longer stops deploys

install/add writes apps/accounts/ecosystem.config.cjs, which no .gitignore
covered, so the next deploy refused: "?? apps/accounts/ecosystem.config.cjs
... changed or added by hand". local_changes skips the PM2 configs the
script makes (also in existing checkouts); apps/accounts/.gitignore for
future releases. bats test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 20:09:44 +02:00
co-authored by Claude Opus 5.5
parent 9bcd24bbbd
commit 4b033a1d1d
4 changed files with 33 additions and 2 deletions
+13
View File
@@ -146,6 +146,19 @@ cc() { bash "$CROSSCODE_HOME/crosscode" "$@"; }
[ ! -s "$LOG" ]
}
@test "the PM2 configs crosscode makes don't count as changes by hand" {
echo "module.exports = {}" > "$CROSSCODE_SITES/hope/events/apps/events/ecosystem.config.js"
mkdir -p "$CROSSCODE_SITES/hope/events/apps/accounts"
echo "module.exports = {}" > "$CROSSCODE_SITES/hope/events/apps/accounts/ecosystem.config.cjs"
run cc deploy hope events --version events@2.2.1 --check
[ "$status" -eq 0 ]
# Anything else added there still does.
echo "notes" > "$CROSSCODE_SITES/hope/events/apps/accounts/notes.txt"
run cc deploy hope events --version events@2.2.1 --check
[ "$status" -eq 1 ]
[[ "$output" == *"apps/accounts/notes.txt"* ]]
}
@test "--allow-local-changes deploys with a file added by hand" {
echo "notes" > "$CROSSCODE_SITES/hope/events/apps/events/notes.txt"
run cc deploy hope events --version events@2.2.1