MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / main

Function main

scripts/build-website-manifest.mjs:83–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83async function main() {
84 const args = parseArgs(process.argv.slice(2));
85 if (args.help) {
86 usage();
87 return;
88 }
89 if (!args.out) {
90 usage();
91 process.exit(2);
92 }
93
94 const [workflows, tools, pkg] = await Promise.all([
95 loadYamlDir(path.join(repoRoot, "manifests", "workflows")),
96 loadYamlDir(path.join(repoRoot, "manifests", "tools")),
97 readFile(path.join(repoRoot, "package.json"), "utf8").then(JSON.parse),
98 ]);
99
100 const ref = args.ref ?? `v${pkg.version}`;
101 const snapshot = {
102 source: `github:getsentry/XcodeBuildMCP@${ref}`,
103 ref,
104 syncedAt: new Date().toISOString(),
105 version: pkg.version,
106 workflows: normalizeWorkflows(workflows),
107 tools: normalizeTools(tools),
108 };
109
110 const outPath = path.resolve(args.out);
111 await mkdir(path.dirname(outPath), { recursive: true });
112 await writeFile(outPath, JSON.stringify(snapshot, null, 2) + "\n", "utf8");
113
114 console.log(
115 `Wrote ${outPath}\n ref: ${ref}\n version: ${snapshot.version}\n workflows: ${snapshot.workflows.length}\n tools: ${snapshot.tools.length}`,
116 );
117}
118
119main().catch((err) => {
120 console.error(err);

Callers 1

Calls 9

usageFunction · 0.85
loadYamlDirFunction · 0.85
readFileFunction · 0.85
normalizeWorkflowsFunction · 0.85
normalizeToolsFunction · 0.85
mkdirFunction · 0.85
writeFileFunction · 0.85
resolveMethod · 0.80
parseArgsFunction · 0.70

Tested by

no test coverage detected