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-05-02 01:04:01 +03:00
|
|
|
echo "Setting the supabase token from environment variables"
|
|
|
|
SUPABASE_ACCESS_TOKEN=$SUPABASE_ACCESS_TOKEN
|
2024-04-27 15:49:15 +03:00
|
|
|
|
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 "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:35:24 +03:00
|
|
|
supabase db push --linked --password $SUPABASE_DB_PASSWORD
|
2024-04-27 15:43:12 +03:00
|
|
|
|