From 9b530e8be9230d1465c9db0131a4b66a83b8a4af Mon Sep 17 00:00:00 2001 From: Kieran Osgood Date: Fri, 5 Jun 2026 14:31:39 +0100 Subject: [PATCH] feat: rename repo-root .env to .demo.env with one-off dev up migration --- .env.example => .demo.env.example | 4 +- .github/CONTRIBUTING.md | 6 +-- .gitignore | 3 ++ AGENTS.md | 2 +- dev.yml | 7 +++ .../samples/CheckoutKitAndroidDemo/README.md | 6 +-- platforms/android/samples/README.md | 4 +- platforms/react-native/CONTRIBUTING.md | 4 +- .../publish_checks/support/package_manager.rb | 4 +- .../Samples/CheckoutKitSwiftDemo/README.md | 6 +-- platforms/swift/Samples/README.md | 8 ++-- scripts/lib/checkout_kit/cli/shell.rb | 20 +++++++- scripts/migrate_demo_env | 35 ++++++++++++++ scripts/setup_storefront_env | 32 ++++++------- scripts/test_setup_storefront_env | 46 +++++++++---------- 15 files changed, 124 insertions(+), 63 deletions(-) rename .env.example => .demo.env.example (85%) create mode 100755 scripts/migrate_demo_env diff --git a/.env.example b/.demo.env.example similarity index 85% rename from .env.example rename to .demo.env.example index 2674c44d..17fb81cf 100644 --- a/.env.example +++ b/.demo.env.example @@ -1,11 +1,11 @@ # Checkout Kit sample storefront configuration. -# Copy this file to .env, fill in local values, then run dev up or: +# Copy this file to .demo.env, fill in local values, then run dev up or: # scripts/setup_storefront_env # Direct interactive setup prompts for optional Apple Pay and Customer Account # API values by default. dev up uses non-interactive setup, so missing optional # values can stay blank. # -# Do not commit real values from .env or generated platform config files. +# Do not commit real values from .demo.env or generated platform config files. # Storefront details STOREFRONT_DOMAIN=your-store.myshopify.com diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8b934744..560bf9d1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -55,7 +55,7 @@ Android, React Native, or Web setup failure is visible without hiding later platform results. If a setup step fails, fix it and rerun `dev up`. Setup creates or syncs sample app storefront configuration from the repo-root -`.env`. If `.env` is missing, setup prompts for required storefront values and +`.demo.env`. If `.demo.env` is missing, setup prompts for required storefront values and then generates the Android, Swift, and React Native sample config files. Optional Apple Pay and Customer Account API values are preserved if already set, but `dev up` leaves missing optional values blank instead of prompting. @@ -66,9 +66,9 @@ React Native sample apps can be run against local in-repo SDK sources with `dev rn ios --local` or `dev rn android --local`. The Web sample accepts a checkout URL directly and does not use the shared storefront credential files. -Sample app storefront configuration is generated from the repo-root `.env`. +Sample app storefront configuration is generated from the repo-root `.demo.env`. Shopify employees get this through `dev up`. External contributors can copy -`.env.example` to `.env`, fill in local storefront values, then run +`.demo.env.example` to `.demo.env`, fill in local storefront values, then run `scripts/setup_storefront_env` from the repo root. --- diff --git a/.gitignore b/.gitignore index ec801816..613d5a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,9 @@ captures/ local.properties .env +# Demo apps' storefront configuration (see .demo.env.example) +.demo.env + # Local developer tooling preferences (see .dev.env.example) .dev.env upload-keystore.jks diff --git a/AGENTS.md b/AGENTS.md index 3e3b78e2..20835a6a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -95,7 +95,7 @@ USE_LOCAL_SDK=1 ./gradlew :shopify_checkout-kit-react-native:testDebugUnitTest ## Sensitive configuration Treat storefront environment and generated sample app configuration values as -sensitive. Never print, commit, paste, or document real values from `.env`, +sensitive. Never print, commit, paste, or document real values from `.demo.env`, generated platform config, access tokens, merchant identifiers, shop IDs, account IDs. Use synthetic placeholders for docs and verification. diff --git a/dev.yml b/dev.yml index ae359b63..614b26ea 100644 --- a/dev.yml +++ b/dev.yml @@ -23,6 +23,13 @@ up: - protocol - platforms/react-native - platforms/web + # TODO(remove after 2026-06-19): one-off migration of the repo-root storefront + # config from .env to .demo.env. Delete this step and scripts/migrate_demo_env + # once developers have run `dev up` at least once. + - custom: + name: Migrate .env to .demo.env + met?: ./scripts/migrate_demo_env --check + meet: ./scripts/migrate_demo_env - custom: name: Run Checkout Kit workspace setup met?: ./scripts/setup_dev_workspace --check --skip-optional-prompts diff --git a/platforms/android/samples/CheckoutKitAndroidDemo/README.md b/platforms/android/samples/CheckoutKitAndroidDemo/README.md index bbecfc9c..72537da8 100644 --- a/platforms/android/samples/CheckoutKitAndroidDemo/README.md +++ b/platforms/android/samples/CheckoutKitAndroidDemo/README.md @@ -73,7 +73,7 @@ Do not edit files in `app/build/generated/source/apollo/` by hand. Update `.grap dev up ``` - If you are not using `dev`, copy the repo-root `.env.example` to `.env`, + If you are not using `dev`, copy the repo-root `.demo.env.example` to `.demo.env`, fill in local values, then run: ```bash @@ -96,7 +96,7 @@ Open the project in Android Studio, sync Gradle, then build and run. ## Updating the Storefront API version -1. Update `API_VERSION` in the repo-root `.env`. +1. Update `API_VERSION` in the repo-root `.demo.env`. 2. Sync the generated platform config: ```sh @@ -139,7 +139,7 @@ Open the project in Android Studio, sync Gradle, then build and run. | File | Purpose | | --- | --- | -| `.env` | Generated sample config from the repo-root `.env` (not checked into git). | +| `.env` | Generated sample config from the repo-root `.demo.env` (not checked into git). | | `app/build.gradle` | Apollo plugin configuration and `BuildConfig` values from `.env`. | | `app/src/main/graphql/schema.graphqls` | Storefront API schema. | | `common/client/StorefrontApiClient.kt` | Apollo client setup and Storefront API auth header. | diff --git a/platforms/android/samples/README.md b/platforms/android/samples/README.md index cea93c05..a58bb927 100644 --- a/platforms/android/samples/README.md +++ b/platforms/android/samples/README.md @@ -2,7 +2,7 @@ This directory contains Android sample apps for Checkout Kit. -Sample app storefront configuration is generated from the repo-root `.env`. +Sample app storefront configuration is generated from the repo-root `.demo.env`. Run `dev up` from the repo root or any platform directory to provision the repo and create or sync the generated sample config files. @@ -18,7 +18,7 @@ From the repo root or this platform directory: dev up ``` -If you are not using `dev`, copy the repo-root `.env.example` to `.env`, fill +If you are not using `dev`, copy the repo-root `.demo.env.example` to `.demo.env`, fill in local values, then run: ```sh diff --git a/platforms/react-native/CONTRIBUTING.md b/platforms/react-native/CONTRIBUTING.md index 4ef13f1d..a264d53c 100644 --- a/platforms/react-native/CONTRIBUTING.md +++ b/platforms/react-native/CONTRIBUTING.md @@ -193,9 +193,9 @@ pnpm module build ### Update sample configuration From the repo root or this platform directory, run `dev up` to create or sync -the sample app dotenv file from the root `.env`. +the sample app dotenv file from the root `.demo.env`. -If you are not using `dev`, copy `.env.example` from the repo root to `.env`, +If you are not using `dev`, copy `.demo.env.example` from the repo root to `.demo.env`, fill in local values, then run `scripts/setup_storefront_env`. ``` diff --git a/platforms/react-native/scripts/publish_checks/support/package_manager.rb b/platforms/react-native/scripts/publish_checks/support/package_manager.rb index 37503d68..aba406e4 100644 --- a/platforms/react-native/scripts/publish_checks/support/package_manager.rb +++ b/platforms/react-native/scripts/publish_checks/support/package_manager.rb @@ -41,9 +41,7 @@ def version end def resolved_binary - Shell.capture('command', '-v', binary).strip - rescue StandardError - binary + Shell.which(binary) || binary end def write_config(app_dir) diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md b/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md index 5ecfdb74..2a7ec16d 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md @@ -70,7 +70,7 @@ Do not edit files in `Generated/` by hand. Update `.graphql` files and regenerat dev up ``` - If you are not using `dev`, copy the repo-root `.env.example` to `.env`, + If you are not using `dev`, copy the repo-root `.demo.env.example` to `.demo.env`, fill in local values, then run: ```bash @@ -92,7 +92,7 @@ Open the project in Xcode, let Swift Package Manager resolve dependencies, then ## Updating the Storefront API version -1. Update `API_VERSION` in the repo-root `.env`. +1. Update `API_VERSION` in the repo-root `.demo.env`. 2. Sync the generated platform config: ```sh @@ -144,7 +144,7 @@ All commands are run from the **repo root** (`checkout-kit/`): | File | Purpose | | --- | --- | -| `Storefront.xcconfig` | Generated sample config from the repo-root `.env` (not checked into git). | +| `Storefront.xcconfig` | Generated sample config from the repo-root `.demo.env` (not checked into git). | | `schema..graphqls` | Storefront API schema downloaded with the Apollo iOS CLI. | | `apollo-codegen-config.json` | Apollo code generation configuration. | | `CheckoutKitSwiftDemo/Sources/Api/Network.swift` | Apollo client setup and authentication interceptor. | diff --git a/platforms/swift/Samples/README.md b/platforms/swift/Samples/README.md index 512aad25..f88e83f2 100644 --- a/platforms/swift/Samples/README.md +++ b/platforms/swift/Samples/README.md @@ -29,7 +29,7 @@ them from the shared `.env`. dev up ``` -2. If you are not using `dev`, copy the repo-root `.env.example` to `.env`, +2. If you are not using `dev`, copy the repo-root `.demo.env.example` to `.demo.env`, fill in local values, then run `scripts/setup_storefront_env`. The setup script generates `platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig`. @@ -52,7 +52,7 @@ To get started: dev up ``` -2. If you are not using `dev`, copy the repo-root `.env.example` to `.env`, +2. If you are not using `dev`, copy the repo-root `.demo.env.example` to `.demo.env`, fill in local values, then run `scripts/setup_storefront_env`. The setup script generates `platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/Storefront.xcconfig`. @@ -69,5 +69,5 @@ Open the build log and check the script output. | Build log output | Cause | Fix | | --- | --- | --- | | `grep: Storefront.xcconfig: No such file or directory` | `Storefront.xcconfig` file is missing. | Run `dev up` from the repo root or any platform directory. | -| `Error: STOREFRONT_DOMAIN is not set in Storefront.xcconfig` | `Storefront.xcconfig` exists but `STOREFRONT_DOMAIN` is blank. | Update root `.env`, then run `dev up`. | -| Associated domains not working at runtime | Domain value is incorrect. | Update root `.env`, then run `dev up`. | +| `Error: STOREFRONT_DOMAIN is not set in Storefront.xcconfig` | `Storefront.xcconfig` exists but `STOREFRONT_DOMAIN` is blank. | Update root `.demo.env`, then run `dev up`. | +| Associated domains not working at runtime | Domain value is incorrect. | Update root `.demo.env`, then run `dev up`. | diff --git a/scripts/lib/checkout_kit/cli/shell.rb b/scripts/lib/checkout_kit/cli/shell.rb index 02df7aea..818bd3d1 100644 --- a/scripts/lib/checkout_kit/cli/shell.rb +++ b/scripts/lib/checkout_kit/cli/shell.rb @@ -89,7 +89,25 @@ def capture(*command, chdir: nil, env: {}) end def command?(binary) - system('command', '-v', binary.to_s, out: File::NULL, err: File::NULL) + !which(binary).nil? + end + + def which(binary) + binary = binary.to_s + return nil if binary.empty? + + if binary.include?(File::SEPARATOR) || (File::ALT_SEPARATOR && binary.include?(File::ALT_SEPARATOR)) + return File.expand_path(binary) if File.file?(binary) && File.executable?(binary) + + return nil + end + + ENV.fetch('PATH', '').split(File::PATH_SEPARATOR).each do |dir| + candidate = File.join(dir.empty? ? '.' : dir, binary) + return candidate if File.file?(candidate) && File.executable?(candidate) + end + + nil end def require_command!(binary, message = nil) diff --git a/scripts/migrate_demo_env b/scripts/migrate_demo_env new file mode 100755 index 00000000..3a30b482 --- /dev/null +++ b/scripts/migrate_demo_env @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# +# TODO(remove after 2026-06-19): temporary one-off migration. +# +# The repo-root storefront configuration moved from `.env` to `.demo.env`. +# This copies an existing `.env` to `.demo.env` once, so developers with a +# pre-existing local `.env` keep working without re-running setup. +# +# It is idempotent: it does nothing once `.demo.env` exists (or if there is no +# `.env` to migrate). Once everyone has run `dev up` at least once, delete this +# script and its `up:` step in dev.yml. +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +OLD_ENV="$ROOT_DIR/.env" +NEW_ENV="$ROOT_DIR/.demo.env" + +needs_migration() { + [[ -f "$OLD_ENV" && ! -f "$NEW_ENV" ]] +} + +# `--check` is the dev `met?` probe: succeed (exit 0) when no work is needed. +if [[ "${1:-}" == "--check" ]]; then + if needs_migration; then + exit 1 + fi + exit 0 +fi + +if needs_migration; then + cp "$OLD_ENV" "$NEW_ENV" + echo "Migrated repo-root .env -> .demo.env (your existing .env was left untouched)." +fi + +exit 0 diff --git a/scripts/setup_storefront_env b/scripts/setup_storefront_env index 79729d7f..1b2a37f4 100755 --- a/scripts/setup_storefront_env +++ b/scripts/setup_storefront_env @@ -4,7 +4,7 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -ROOT_ENV="${ROOT_DIR}/.env" +ROOT_ENV="${ROOT_DIR}/.demo.env" ANDROID_ENV="${ROOT_DIR}/platforms/android/samples/CheckoutKitAndroidDemo/.env" SWIFT_DEMO_XCCONFIG="${ROOT_DIR}/platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig" SWIFT_ACCELERATED_XCCONFIG="${ROOT_DIR}/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/Storefront.xcconfig" @@ -17,7 +17,7 @@ usage() { cat <&2 + echo "Missing storefront configuration: .demo.env" >&2 exit 1 fi if is_missing_required_value "$(read_env_value STOREFRONT_DOMAIN "$ROOT_ENV")" || is_missing_required_value "$(read_env_value STOREFRONT_ACCESS_TOKEN "$ROOT_ENV")"; then - echo "Root .env is missing required storefront configuration." >&2 + echo "Root .demo.env is missing required storefront configuration." >&2 exit 1 fi if ! root_has_canonical_keys; then - echo "Root .env is missing canonical storefront configuration keys." >&2 + echo "Root .demo.env is missing canonical storefront configuration keys." >&2 exit 1 fi if customer_account_api_version_needs_default; then - echo "Root .env has a blank Customer Account API version." >&2 + echo "Root .demo.env has a blank Customer Account API version." >&2 exit 1 fi @@ -670,27 +670,27 @@ ensure_root_env() { local root_needs_write="false" if [[ ! -f "$ROOT_ENV" ]]; then root_needs_write="true" - echo "Creating root storefront configuration at .env." + echo "Creating root storefront configuration at .demo.env." elif is_missing_required_value "$(read_env_value STOREFRONT_DOMAIN "$ROOT_ENV")" || is_missing_required_value "$(read_env_value STOREFRONT_ACCESS_TOKEN "$ROOT_ENV")"; then root_needs_write="true" - echo "Updating root storefront configuration at .env." + echo "Updating root storefront configuration at .demo.env." elif ! root_has_canonical_keys; then root_needs_write="true" - echo "Normalizing root storefront configuration at .env." + echo "Normalizing root storefront configuration at .demo.env." elif customer_account_api_version_needs_default; then root_needs_write="true" - echo "Normalizing root storefront configuration at .env." + echo "Normalizing root storefront configuration at .demo.env." fi if [[ "$root_needs_write" == "true" ]]; then collect_missing_values generate_root_env >"$ROOT_ENV" elif fill_optional_values_from_environment; then - echo "Updating optional storefront configuration at .env." + echo "Updating optional storefront configuration at .demo.env." generate_root_env >"$ROOT_ENV" elif optional_values_need_prompt; then - echo "Updating optional storefront configuration at .env." + echo "Updating optional storefront configuration at .demo.env." collect_missing_values generate_root_env >"$ROOT_ENV" fi diff --git a/scripts/test_setup_storefront_env b/scripts/test_setup_storefront_env index 0dc6b7aa..77965750 100755 --- a/scripts/test_setup_storefront_env +++ b/scripts/test_setup_storefront_env @@ -95,7 +95,7 @@ test_sync_and_check() { "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_file_exists "$fixture/.env" + assert_file_exists "$fixture/.demo.env" assert_file_exists "$fixture/platforms/android/samples/CheckoutKitAndroidDemo/.env" assert_file_exists "$fixture/platforms/react-native/sample/.env" assert_file_exists "$fixture/platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig" @@ -113,8 +113,8 @@ test_sync_and_check() { awk ' /^API_VERSION=/ { print "API_VERSION=2026-01"; next } { print } - ' "$fixture/.env" >"$fixture/.env.next" - mv "$fixture/.env.next" "$fixture/.env" + ' "$fixture/.demo.env" >"$fixture/.demo.env.next" + mv "$fixture/.demo.env.next" "$fixture/.demo.env" "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" @@ -140,11 +140,11 @@ test_required_values_only() { "$fixture/scripts/setup_storefront_env" --skip-optional-prompts >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_file_exists "$fixture/.env" - assert_contains "$fixture/.env" "STOREFRONT_MERCHANT_IDENTIFIER=" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_CLIENT_ID=" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_SHOP_ID=" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" + assert_file_exists "$fixture/.demo.env" + assert_contains "$fixture/.demo.env" "STOREFRONT_MERCHANT_IDENTIFIER=" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_CLIENT_ID=" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_SHOP_ID=" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" assert_contains "$fixture/platforms/android/samples/CheckoutKitAndroidDemo/.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" assert_not_contains "$fixture/platforms/react-native/sample/.env" "CUSTOMER_ACCOUNT_API_VERSION" assert_not_contains "$fixture/platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig" "CUSTOMER_ACCOUNT_API_VERSION" @@ -164,9 +164,9 @@ test_optional_sync_updates_blank_optional_values_after_required_setup() { "$fixture/scripts/setup_storefront_env" --skip-optional-prompts >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_contains "$fixture/.env" "STOREFRONT_MERCHANT_IDENTIFIER=" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_CLIENT_ID=" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_SHOP_ID=" + assert_contains "$fixture/.demo.env" "STOREFRONT_MERCHANT_IDENTIFIER=" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_CLIENT_ID=" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_SHOP_ID=" STOREFRONT_MERCHANT_IDENTIFIER=synthetic-merchant \ CUSTOMER_ACCOUNT_API_CLIENT_ID=synthetic-client \ @@ -174,9 +174,9 @@ test_optional_sync_updates_blank_optional_values_after_required_setup() { "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_contains "$fixture/.env" "STOREFRONT_MERCHANT_IDENTIFIER=synthetic-merchant" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_CLIENT_ID=synthetic-client" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_SHOP_ID=synthetic-shop" + assert_contains "$fixture/.demo.env" "STOREFRONT_MERCHANT_IDENTIFIER=synthetic-merchant" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_CLIENT_ID=synthetic-client" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_SHOP_ID=synthetic-shop" assert_contains "$fixture/platforms/react-native/sample/.env" "STOREFRONT_MERCHANT_IDENTIFIER=\"synthetic-merchant\"" assert_contains "$fixture/platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig" "CUSTOMER_ACCOUNT_API_CLIENT_ID = synthetic-client" assert_contains "$fixture/platforms/android/samples/CheckoutKitAndroidDemo/.env" "CUSTOMER_ACCOUNT_API_REDIRECT_URI=shop.synthetic-shop.app://callback" @@ -187,21 +187,21 @@ test_normalizes_existing_root_env() { fixture="$(make_fixture)" output="$fixture/output.log" - cat >"$fixture/.env" <<'EOF' + cat >"$fixture/.demo.env" <<'EOF' STOREFRONT_DOMAIN=synthetic-store.example.myshopify.com STOREFRONT_ACCESS_TOKEN=synthetic-token EOF if "$fixture/scripts/setup_storefront_env" --check >"$output" 2>&1; then - fail "non-canonical root .env passed --check" + fail "non-canonical root .demo.env passed --check" fi assert_output_is_sanitized "$output" "$fixture/scripts/setup_storefront_env" --skip-optional-prompts >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" - assert_contains "$fixture/.env" "EMAIL=checkout-kit@example.com" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" + assert_contains "$fixture/.demo.env" "EMAIL=checkout-kit@example.com" "$fixture/scripts/setup_storefront_env" --check >"$output" 2>&1 assert_output_is_sanitized "$output" @@ -212,7 +212,7 @@ test_blank_customer_account_api_version_defaults() { fixture="$(make_fixture)" output="$fixture/output.log" - cat >"$fixture/.env" <<'EOF' + cat >"$fixture/.demo.env" <<'EOF' STOREFRONT_DOMAIN=synthetic-store.example.myshopify.com STOREFRONT_ACCESS_TOKEN=synthetic-token STOREFRONT_MERCHANT_IDENTIFIER= @@ -236,7 +236,7 @@ EOF "$fixture/scripts/setup_storefront_env" --skip-optional-prompts >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" assert_contains "$fixture/platforms/android/samples/CheckoutKitAndroidDemo/.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" assert_contains "$fixture/platforms/android/samples/CheckoutKitAndroidDemo/.env" "/2026-04/graphql" } @@ -260,9 +260,9 @@ EOF "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" - assert_file_exists "$fixture/.env" - assert_contains "$fixture/.env" "API_VERSION=2026-04" - assert_contains "$fixture/.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" + assert_file_exists "$fixture/.demo.env" + assert_contains "$fixture/.demo.env" "API_VERSION=2026-04" + assert_contains "$fixture/.demo.env" "CUSTOMER_ACCOUNT_API_VERSION=2026-04" "$fixture/scripts/setup_storefront_env" --check >"$output" 2>&1 assert_output_is_sanitized "$output"