mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-24 22:48:06 +00:00
6432d2154a
As part of changes in e438887dfb, we'd
missed the fact that `tools/` would need to have the logger initialized
too.
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { Command } from 'commander';
|
|
import { init, logger } from '../lib/logger/index.ts';
|
|
import { bake } from './utils/docker.ts';
|
|
import { parsePositiveInt, parseVersion } from './utils/index.ts';
|
|
|
|
await init();
|
|
|
|
const program = new Command('pnpm build:docker');
|
|
|
|
program
|
|
.command('build')
|
|
.description('Build docker images')
|
|
.option('--platform <type>', 'docker platforms to build')
|
|
.option('--version <version>', 'version to use as tag', parseVersion)
|
|
.option('--tries <tries>', 'number of tries on failure', parsePositiveInt)
|
|
.option(
|
|
'--delay <delay>',
|
|
'delay between tries for docker build (eg. 5s, 10m, 1h)',
|
|
'30s',
|
|
)
|
|
.option('--args <args...>', 'additional arguments to pass to docker build')
|
|
.action(async (opts) => {
|
|
logger.info('Building docker images ...');
|
|
await bake('build', opts);
|
|
});
|
|
|
|
program
|
|
.command('push')
|
|
.description('Publish docker images')
|
|
.option('--platform <type>', 'docker platforms to build')
|
|
.option('--version <version>', 'version to use as tag', parseVersion)
|
|
.action(async (opts) => {
|
|
logger.info('Publishing docker images ...');
|
|
await bake('push', opts);
|
|
});
|
|
|
|
void program.parseAsync();
|