From 885e9a63f6e7603d5fb9ca6f818c9aa5b3e31e1d Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Fri, 18 Sep 2020 13:10:50 +0800 Subject: [PATCH] use version from lerna.json or fallback to 0.1.0 --- packages/cli/src/commands/create-plugin/createPlugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 9b96dbc79d..247812b6fd 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -237,7 +237,9 @@ export default async (cmd: Command) => { ? paths.resolveTargetRoot('plugins', answers.id) : paths.resolveTargetRoot(answers.id); const ownerIds = parseOwnerIds(answers.owner); - const version = backstageVersion; + const { version } = isMonoRepo + ? await fs.readJson(paths.resolveTargetRoot('lerna.json')) + : { version: '0.1.0' }; Task.log(); Task.log('Creating the plugin...');