Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
- extract build logic to a testable module
- remove load flag
  • Loading branch information
Roy Razon committed Nov 23, 2023
1 parent 5e76bce commit 0bd760b
Show file tree
Hide file tree
Showing 5 changed files with 526 additions and 91 deletions.
21 changes: 7 additions & 14 deletions packages/cli-common/src/lib/common-flags/build-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@ export const buildFlags = {
'no-registry-cache': Flags.boolean({
description: 'Do not add the registry as a cache source and target',
helpGroup,
allowNo: false,
required: false,
dependsOn: ['registry'],
}),
load: Flags.boolean({
description: 'Load build results to the Docker server at the deployment target',
helpGroup,
required: false,
}),
builder: Flags.string({
description: 'Builder to use',
helpGroup,
Expand All @@ -63,14 +59,11 @@ export const parseBuildFlags = (flags: Omit<InferredFlags<typeof buildFlags>, 'j
builder: flags.builder,
noCache: flags['no-cache'],
cacheFromRegistry: !flags['no-registry-cache'],
...flags.registry
? {
registry: parseRegistry({
registry: flags.registry,
singleName: flags['no-registry-single-name'] ? false : flags['registry-single-name'],
}),
load: flags.load,
}
: { load: true },
...flags.registry && {
registry: parseRegistry({
registry: flags.registry,
singleName: flags['no-registry-single-name'] ? false : flags['registry-single-name'],
}),
},
}
}
Loading

0 comments on commit 0bd760b

Please sign in to comment.