Skip to content

Commit

Permalink
package-dynamic-plugins: remove --marketplace flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kadel committed Jan 17, 2025
1 parent f7b2765 commit 5460482
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
4 changes: 0 additions & 4 deletions packages/cli/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ export function registerScriptCommand(program: Command) {
'By defult, the command uses podman to build the container image. Use this flag to use docker instead.',
false,
)
.option(
'-m, --marketplace-file <file>',
'Marketplace yaml file. This is a Plugin entity definition for Marketplace.',
)
.option(
'--platform <platform>',
'Platform to use when building the container image. Default is "linux/amd64". Can be set to "" to not set --platfrom flag in builder command.',
Expand Down
25 changes: 0 additions & 25 deletions packages/cli/src/commands/package-dynamic-plugins/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export async function command(opts: OptionValues): Promise<void> {
preserveTempDir,
tag,
useDocker,
marketplaceFile,
platform,
} = opts;
if (!exportTo && !tag) {
Expand All @@ -40,19 +39,6 @@ export async function command(opts: OptionValues): Promise<void> {
return;
}
}
const maketplaceInfo: Object[] = [];
if (marketplaceFile) {
if (!fs.existsSync(marketplaceFile)) {
Task.error(`Marketplace file ${marketplaceFile} does not exist`);
return;
}
const yamlDocuments = YAML.parseAllDocuments(
fs.readFileSync(marketplaceFile).toLocaleString(),
);
for (const document of yamlDocuments) {
maketplaceInfo.push(document.toJS());
}
}
const workspacePackage = (await fs.readJson(
paths.resolveTarget('package.json'),
)) as PackageJson;
Expand Down Expand Up @@ -226,17 +212,6 @@ export async function command(opts: OptionValues): Promise<void> {
const flags = [
`--annotation io.backstage.dynamic-packages='${Buffer.from(JSON.stringify(pluginRegistryMetadata)).toString('base64')}'`,
];

for (const pluginInfo of maketplaceInfo) {
const base64pluginInfo = Buffer.from(
JSON.stringify(pluginInfo),
).toString('base64');
const pluginName = (pluginInfo as { metadata: { name: string } })
.metadata.name;
flags.push(
`--annotation io.backstage.marketplace/${pluginName}='${base64pluginInfo}'`,
);
}
if (platform) {
flags.push(`--platform ${platform}`);
}
Expand Down

0 comments on commit 5460482

Please sign in to comment.