this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

When running `wrangler deploy` add a `OPEN_NEXT_DEPLOY` environment variable to let wrangler know that it is being run by open-next (#1023)

authored by

Dario Piotrowicz and committed by
GitHub
a4a2f02f 721bff02

+14
+5
.changeset/mighty-heads-shine.md
··· 1 + --- 2 + "@opennextjs/cloudflare": patch 3 + --- 4 + 5 + When running `wrangler deploy` add a `OPEN_NEXT_DEPLOY` environment variable to let wrangler know that it is being run by open-next
+7
packages/cloudflare/src/cli/commands/deploy.ts
··· 56 56 ], 57 57 { 58 58 logging: "all", 59 + env: { 60 + // If we are running the deploy command we set this OPEN_NEXT_DEPLOY environment variable 61 + // to let `wrangler deploy` know that it is being run from open-next. We do this because 62 + // otherwise `wrangler deploy` run in an open-next project would call 63 + // `opennextjs-cloudflare deploy` (thus causing an unwanted recursion). 64 + OPEN_NEXT_DEPLOY: "true", 65 + }, 59 66 } 60 67 ); 61 68 }
+2
packages/cloudflare/src/cli/utils/run-wrangler.ts
··· 13 13 environment?: string; 14 14 configPath?: string; 15 15 logging?: "all" | "error"; 16 + env?: Record<string, string>; 16 17 }; 17 18 18 19 /** ··· 79 80 stdio: shouldPipeLogs ? ["ignore", "pipe", "pipe"] : "inherit", 80 81 env: { 81 82 ...process.env, 83 + ...wranglerOpts.env, 82 84 // `.env` files are handled by the adapter. 83 85 // Wrangler would load `.env.<wrangler env>` while we should load `.env.<process.env.NEXTJS_ENV>` 84 86 // See https://opennext.js.org/cloudflare/howtos/env-vars