From 56acfcab1baedd3b76d91f04d0778099d6247bdb Mon Sep 17 00:00:00 2001 From: dal Date: Thu, 8 May 2025 03:25:59 -0600 Subject: [PATCH] fix on release and run --- .github/workflows/cli-release.yml | 2 +- cli/cli/src/commands/run.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index b85f885df..2ede9361d 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -130,7 +130,7 @@ jobs: - name: Extract version from Cargo.toml id: get_version run: | - VERSION=$(grep '^version =' cli/cli/Cargo.toml | sed 's/version = "\\(.*\ astounding\\)"/\\1/') + VERSION=$(grep '^version =' cli/cli/Cargo.toml | sed 's/version = "\(.*\)"/\1/') echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION" - name: Create Release diff --git a/cli/cli/src/commands/run.rs b/cli/cli/src/commands/run.rs index daad8db8b..510776105 100644 --- a/cli/cli/src/commands/run.rs +++ b/cli/cli/src/commands/run.rs @@ -11,6 +11,7 @@ use std::time::Duration; #[derive(RustEmbed)] #[folder = "../../"] +#[include = ".env.example"] #[include = "docker-compose.yml"] #[include = "supabase/.env.example"] #[include = "supabase/**/*"] @@ -69,8 +70,8 @@ async fn setup_persistent_app_environment() -> Result { )) })?; - // Initialize .env from supabase/.env.example, which should have been extracted by StaticAssets loop - let example_env_src_path = app_base_dir.join("supabase/.env.example"); + // Initialize .env from .env.example (the one at app_base_dir), which should have been extracted by StaticAssets loop + let example_env_src_path = app_base_dir.join(".env.example"); let main_dot_env_target_path = app_base_dir.join(".env"); if example_env_src_path.exists() { @@ -83,7 +84,7 @@ async fn setup_persistent_app_environment() -> Result { )) })?; } else { - // This case should ideally not be hit if supabase/.env.example is correctly embedded and extracted. + // This case should ideally not be hit if .env.example is correctly embedded and extracted. // If it's missing, it indicates an issue with asset handling. return Err(BusterError::CommandError(format!( "Critical setup error: {} not found after asset extraction. Cannot initialize main .env file.",