2024-04-27 15:43:12 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-04-27 16:00:35 +03:00
|
|
|
echo "Setting the project ID from environment variable"
|
2024-04-27 15:43:12 +03:00
|
|
|
PROJECT_ID=$PROJECT_ID
|
|
|
|
|
2024-04-27 16:00:35 +03:00
|
|
|
echo "Setting the supabase token from environment variable"
|
2024-04-27 15:49:15 +03:00
|
|
|
SUPABASE_ACCESS_TOKEN=$SUPABASE_ACCESS_TOKEN
|
|
|
|
|
2024-04-27 16:04:19 +03:00
|
|
|
echo "Setting the supabase db password from environment variable"
|
|
|
|
SUPABASE_DB_PASSWORD=$SUPABASE_DB_PASSWORD
|
|
|
|
|
2024-04-27 16:00:35 +03:00
|
|
|
echo "Initializing supabase"
|
2024-04-27 15:56:45 +03:00
|
|
|
supabase init
|
|
|
|
|
2024-04-27 16:00:35 +03:00
|
|
|
echo "Logging in to supabase"
|
2024-04-27 15:49:15 +03:00
|
|
|
supabase login --token $SUPABASE_ACCESS_TOKEN
|
|
|
|
|
2024-04-27 16:00:35 +03:00
|
|
|
echo "Running supabase link"
|
2024-04-27 16:04:19 +03:00
|
|
|
supabase link --project-ref $PROJECT_ID --password $SUPABASE_DB_PASSWORD
|
2024-04-27 15:43:12 +03:00
|
|
|
|
2024-04-27 16:00:35 +03:00
|
|
|
echo "Running supabase db push"
|
2024-04-27 16:09:55 +03:00
|
|
|
supabase db push --linked --password $SUPABASE_DB_PASSWORD --debug
|
2024-04-27 15:43:12 +03:00
|
|
|
|