You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support CLOUDFLARE_ENV environment variable for selecting the active environment (#11228)
* Make BundleController tests able to run on non-unix OSs
* ignore generated files from eslint
* fix home directory mocking
* Improve isolation of containers push tests
* use logger.loggerLevel rather than recomputing it in Wrangler
The startup-profiling test was leaking the logger level between tests,
so that got fixed in here too.
* move environment variable handling from `wrangler` to `@cloudflare/workers-utils`
* Support `CLOUDFLARE_ENV` environment variable for selecting the active environment
This change enables users to select the environment for commands such as `CLOUDFLARE_ENV=prod wrangler versions upload`.
The `--env` command line argument takes precedence.
The `CLOUDFLARE_ENV` enviroment variable is mostly used with the `@cloudflare/vite-plugin` to select the environment for building
the Worker to be deployed. This build also generates a "redirected deploy config" that is flattened to only contain the active environment.
To avoid accidentally deploying a version that is built for one environment to a different environment, there is an additional
check to ensure that if the user specifies an environment in Wrangler it matches the original selected environment from the build.
* fix error message when both CLOUDFLARE_ENV and --env are provided
* fix "via" part of the validation error
* fixups after James' review
* send the errors to Sentry so we can ascertain how often this occurs
* fixups from Dario
Support `CLOUDFLARE_ENV` environment variable for selecting the active environment
7
+
8
+
This change enables users to select the environment for commands such as `CLOUDFLARE_ENV=prod wrangler versions upload`. The `--env` command line argument takes precedence.
9
+
10
+
The `CLOUDFLARE_ENV` environment variable is mostly used with the `@cloudflare/vite-plugin` to select the environment for building the Worker to be deployed. This build also generates a "redirected deploy config" that is flattened to only contain the active environment.
11
+
To avoid accidentally deploying a version that is built for one environment to a different environment, there is an additional check to ensure that if the user specifies an environment in Wrangler it matches the original selected environment from the build.
0 commit comments