8000 deploy: close the psql session ext-keys-check.sh opens by ynishi · Pull Request #50 · ynishi/evalhub · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion deploy/fly/ext-keys-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ database=${EVALHUB_FLY_DATABASE:-${app//-/_}}
fly auth whoami >/dev/null

echo "ext keys outside {ns}/{name} on $db_app/$database:"
fly postgres connect --app "$db_app" --database "$database" < deploy/fly/ext-keys.sql
# psql stays at its prompt after the file's last statement, so the session
# is closed explicitly; without the `\q` the script waits on it forever.
{ cat deploy/fly/ext-keys.sql; printf '\\q\n'; } \
| fly postgres connect --app "$db_app" --database "$database"
Loading
0