-
init_xtasknow takes anXtaskArgsparameter and the argument parsing is done with a dedicated functionparse_args<C: clap::Subcommand>. You need to update the call toinit_xtaskinto two function calls. This allows to mutate the command arguments before actually initializing xtask.Replace:
let args = init_xtask::<Command>()?;
With:
let args = init_xtask::<Command>(parse_args::<Command>()?)?;
-
The
execution environmenthas been renamed to thecontextwhich is more accurate and broad. The flag-E, --execution-environmentis now-c, --context. -
All
handle_commandfunctions of base commands now take theenvironmentand thecontextas parameters.Before:
pub fn handle_command(args: TestCmdArgs) -> anyhow::Result<()> {}
After:
pub fn handle_command(args: TestCmdArgs, env: Environment, ctx: Context) -> anyhow::Result<()> {}
-
Automatic sourcing of environment files containing environment variables given the value for the
-e,--environmentargument:.envfor any set environment,.env.{environment}(example:.env.dev) for the non-sensitive configuration,.env.{environment}.secrets(example.env.dev.secrets) for the sensitive configuration like password. These
-
new command
dockerintegrated with the automatic sourcing of environment variable files. It starts a docker compose stack with the naming schemedocker-compose.{env}.yml,envbeing the shorthand environment name. -
TestCmdArgsaccepts new parameters--forceand--nocapture. -
BuildCmdArgsaccepts new parameter--release.