Merge pull request #5877 from backstage/rugvip/cli-updates
cli: make create-github-app available and deprecate backend:build-image
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Mark the `create-github-app` command as ready for use and reveal it in the command list.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Deprecated the `backend:build-image` command, pointing to the newer `backend:bundle` command.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { yellow } from 'chalk';
|
||||
import fs from 'fs-extra';
|
||||
import { join as joinPath, relative as relativePath } from 'path';
|
||||
import { createDistWorkspace } from '../../lib/packager';
|
||||
@@ -31,6 +32,15 @@ export default async (cmd: Command) => {
|
||||
return;
|
||||
}
|
||||
|
||||
console.warn(
|
||||
yellow(`
|
||||
The backend:build-image command is deprecated and will be removed in the future.
|
||||
Please use the backend:bundle command instead along with your own Docker setup.
|
||||
|
||||
https://backstage.io/docs/deployment/docker
|
||||
`),
|
||||
);
|
||||
|
||||
const pkgPath = paths.resolveTarget(PKG_PATH);
|
||||
const pkg = await fs.readJson(pkgPath);
|
||||
const appConfigs = await findAppConfigs();
|
||||
|
||||
@@ -60,11 +60,7 @@ export function registerCommands(program: CommanderStatic) {
|
||||
.helpOption(', --backstage-cli-help') // Let docker handle --help
|
||||
.option('--build', 'Build packages before packing them into the image')
|
||||
.description(
|
||||
// TODO: Add example use cases in Backstage documentation.
|
||||
// For example, if a $NPM_TOKEN needs to be exposed, run `backend:build-image --secret
|
||||
// id=NPM_TOKEN,src=/NPM_TOKEN.txt`.
|
||||
'Bundles the package into a docker image. All extra args are forwarded to ' +
|
||||
'`docker image build`.',
|
||||
'Bundles the package into a docker image. This command is deprecated and will be removed.',
|
||||
)
|
||||
.action(lazy(() => import('./backend/buildImage').then(m => m.default)));
|
||||
|
||||
@@ -225,10 +221,8 @@ export function registerCommands(program: CommanderStatic) {
|
||||
.action(lazy(() => import('./buildWorkspace').then(m => m.default)));
|
||||
|
||||
program
|
||||
.command('create-github-app <github-org>', { hidden: true })
|
||||
.description(
|
||||
'Create new GitHub App in your organization. This command is experimental and may change in the future.',
|
||||
)
|
||||
.command('create-github-app <github-org>')
|
||||
.description('Create new GitHub App in your organization.')
|
||||
.action(lazy(() => import('./create-github-app').then(m => m.default)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user