crosscode script: Accounts' pre-deploy dumps don't stop a deploy
The dump made before each Accounts deploy (apps/accounts/backend/backups/) counted as a file added by hand on Accounts below 1.3.0, which has no .gitignore for it, so the next deploy stopped. Untracked files in that folder no longer count (CROSSCODE_OWN_DIRS in lib/common.sh). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -159,6 +159,20 @@ cc() { bash "$CROSSCODE_HOME/crosscode" "$@"; }
|
||||
[[ "$output" == *"apps/accounts/notes.txt"* ]]
|
||||
}
|
||||
|
||||
@test "the database dumps crosscode makes don't count as changes by hand" {
|
||||
# Accounts below 1.3.0 has no .gitignore for backend/backups/.
|
||||
mkdir -p "$CROSSCODE_SITES/hope/events/apps/accounts/backend/backups"
|
||||
echo "dump" > "$CROSSCODE_SITES/hope/events/apps/accounts/backend/backups/accounts-20261119-221205.sql.gz"
|
||||
run cc deploy hope events --version events@2.2.1 --check
|
||||
[ "$status" -eq 0 ]
|
||||
# A file merely named like the folder still counts.
|
||||
echo "notes" > "$CROSSCODE_SITES/hope/events/apps/accounts/backend/backups.txt"
|
||||
run cc deploy hope events --version events@2.2.1 --check
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"apps/accounts/backend/backups.txt"* ]]
|
||||
[[ "$output" != *"accounts-20261119-221205.sql.gz"* ]]
|
||||
}
|
||||
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user