From 54ef04e72ac16e2f09ee6016c6dcf714c8683094 Mon Sep 17 00:00:00 2001 From: Heather Lee Date: Wed, 28 Apr 2021 17:21:26 -0700 Subject: [PATCH 1/3] Added lax option to app:build Signed-off-by: Heather Lee --- packages/cli/src/commands/app/build.ts | 1 + packages/cli/src/commands/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/cli/src/commands/app/build.ts b/packages/cli/src/commands/app/build.ts index 21189e9427..0da4112646 100644 --- a/packages/cli/src/commands/app/build.ts +++ b/packages/cli/src/commands/app/build.ts @@ -30,6 +30,7 @@ export default async (cmd: Command) => { ...(await loadCliConfig({ args: cmd.config, fromPackage: name, + mockEnv: cmd.lax, })), }); }; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index c770239464..ae39941106 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -29,6 +29,7 @@ export function registerCommands(program: CommanderStatic) { .command('app:build') .description('Build an app for a production release') .option('--stats', 'Write bundle stats to output directory') + .option('--lax', 'Do not require environment variables to be set') .option(...configOption) .action(lazy(() => import('./app/build').then(m => m.default))); From fc79a6dd3c9932327b50b161409c33469700d231 Mon Sep 17 00:00:00 2001 From: Heather Lee Date: Wed, 28 Apr 2021 17:27:58 -0700 Subject: [PATCH 2/3] Added changeset Signed-off-by: Heather Lee --- .changeset/nice-shirts-fetch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/nice-shirts-fetch.md diff --git a/.changeset/nice-shirts-fetch.md b/.changeset/nice-shirts-fetch.md new file mode 100644 index 0000000000..e9537e63b3 --- /dev/null +++ b/.changeset/nice-shirts-fetch.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Added lax option to backstage-cli app:build command From 3923318d8780f51f416f4b688da8d0c9bdfa4d06 Mon Sep 17 00:00:00 2001 From: Heather Lee Date: Wed, 28 Apr 2021 17:41:45 -0700 Subject: [PATCH 3/3] Updated documentation Signed-off-by: Heather Lee --- docs/cli/commands.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/cli/commands.md b/docs/cli/commands.md index 324d17463c..a99d4cd9d0 100644 --- a/docs/cli/commands.md +++ b/docs/cli/commands.md @@ -111,6 +111,7 @@ Usage: backstage-cli app:build Options: --stats Write bundle stats to output directory + --lax Do not require environment variables to be set --config <path> Config files to load instead of app-config.yaml (default: []) -h, --help display help for command ``` @@ -486,6 +487,7 @@ Usage: backstage-cli config:print [options] Options: --package <name> Only load config schema that applies to the given package + --lax Do not require environment variables to be set --frontend Print only the frontend configuration --with-secrets Include secrets in the printed configuration --format <format> Format to print the configuration in, either json or yaml [yaml] @@ -506,6 +508,7 @@ Usage: backstage-cli config:check [options] Options: --package <name> Only load config schema that applies to the given package + --lax Do not require environment variables to be set --config <path> Config files to load instead of app-config.yaml (default: []) -h, --help display help for command ```