mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 05:39:10 +00:00
18 lines
709 B
TypeScript
18 lines
709 B
TypeScript
import { upgradeableTooling } from '../../lib/modules/manager/asdf/upgradeable-tooling';
|
|
import { readFile, updateFile } from '../utils';
|
|
import { replaceContent } from './utils';
|
|
|
|
function generateTooling(): string {
|
|
return Object.entries(upgradeableTooling)
|
|
.map(([name, { asdfPluginUrl }]) => `- [${name}](${asdfPluginUrl})`)
|
|
.join('\n');
|
|
}
|
|
|
|
export async function generateManagerAsdfSupportedPlugins(
|
|
dist: string,
|
|
): Promise<void> {
|
|
const indexFileName = `${dist}/modules/manager/asdf/index.md`;
|
|
let indexContent = await readFile(indexFileName);
|
|
indexContent = replaceContent(indexContent, generateTooling());
|
|
await updateFile(`${dist}/modules/manager/asdf/index.md`, indexContent);
|
|
}
|