-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
24 lines (18 loc) · 736 Bytes
/
Copy pathdeploy.sh
File metadata and controls
24 lines (18 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
# Deploys the linked project (or the ref given as first argument): migrations, config,
# menu function. Needs a logged in cli. SUPABASE_DB_PUSH_BIN can point db push at
# another supabase binary, see the version note in the README.
set -euo pipefail
cd "$(dirname "$0")"
ref_args=()
if [[ $# -ge 1 ]]; then
ref_args=(--project-ref "$1")
fi
db_push_bin="${SUPABASE_DB_PUSH_BIN:-supabase}"
echo '==> db push (migrations)'
"$db_push_bin" db push --yes ${ref_args[@]+"${ref_args[@]}"}
echo '==> config push (exposed schemas, auth)'
supabase config push --yes ${ref_args[@]+"${ref_args[@]}"}
echo '==> functions deploy: menu'
supabase functions deploy menu ${ref_args[@]+"${ref_args[@]}"}
echo 'Deploy finished.'