diff --git a/.github/workflows/cd-android-live-update.yml b/.github/workflows/cd-android-live-update.yml index 3ec3b55f..48ff11ee 100644 --- a/.github/workflows/cd-android-live-update.yml +++ b/.github/workflows/cd-android-live-update.yml @@ -1,7 +1,7 @@ name: CD Android Live Update on: push: - branches: [main, master] + branches: [ main, master ] paths: - 'android/capawesome.json' - '.github/workflows/cd-android-live-update.yml' @@ -60,7 +60,6 @@ jobs: - name: Deploy Live Update env: NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} - NEXT_PUBLIC_SUPABASE_INSTANCE_ID: ${{ secrets.NEXT_PUBLIC_SUPABASE_INSTANCE_ID }} NEXT_PUBLIC_SUPABASE_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_KEY }} CAPAWESOME_TOKEN: ${{ secrets.CAPAWESOME_TOKEN }} commitRef: ${{ github.head_ref || github.ref_name }} diff --git a/.github/workflows/cd-android.yml b/.github/workflows/cd-android.yml index 52b35b93..6b9578ac 100644 --- a/.github/workflows/cd-android.yml +++ b/.github/workflows/cd-android.yml @@ -63,7 +63,6 @@ jobs: - name: Compile Web App into Android assets env: NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} - NEXT_PUBLIC_SUPABASE_INSTANCE_ID: ${{ secrets.NEXT_PUBLIC_SUPABASE_INSTANCE_ID }} NEXT_PUBLIC_SUPABASE_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_KEY }} run: yarn build-sync-android diff --git a/backend/shared/src/supabase/init.ts b/backend/shared/src/supabase/init.ts index 0d27cdff..0773d939 100644 --- a/backend/shared/src/supabase/init.ts +++ b/backend/shared/src/supabase/init.ts @@ -101,13 +101,6 @@ let pgpDirect: IDatabase | null = null export function createSupabaseDirectClient(instanceId?: string, password?: string) { if (pgpDirect) return pgpDirect const hasDatabaseUrl = !!process.env.DATABASE_URL - // Only enforce Supabase credentials when not using DATABASE_URL - instanceId = instanceId ?? getInstanceId() - if (!hasDatabaseUrl && !instanceId) { - throw new Error( - "Can't connect to Supabase; no process.env.SUPABASE_INSTANCE_ID and no instance ID in config.", - ) - } password = password ?? getSupabasePwd() if (!hasDatabaseUrl && !password) { throw new Error("Can't connect to Supabase; no process.env.SUPABASE_DB_PASSWORD.") diff --git a/web/lib/supabase/db.ts b/web/lib/supabase/db.ts index 3097d63d..7239a46f 100644 --- a/web/lib/supabase/db.ts +++ b/web/lib/supabase/db.ts @@ -22,7 +22,7 @@ export function initSupabaseClient() { if (urlOverride || anonKeyOverride) { console.warn( - 'Supabase env override is partially set. Both URL and ANON_KEY are required. Falling back to ENV_CONFIG.', + 'Supabase env override is partially set. Both SUPABASE_URL and ANON_KEY are required. Falling back to ENV_CONFIG.', ) }