MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / main

Function main

apps/cli/src/release.ts:252–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

250};
251
252const main = async () => {
253 const options = parseArgs(process.argv.slice(2));
254 const version = await readVersion();
255 const tag = `v${version}`;
256 const refTag = resolveTagFromEnvironment();
257 const channel = resolveChannel(version);
258
259 validateVersion(version);
260
261 if (refTag && refTag !== tag) {
262 throw new Error(`GitHub tag ${refTag} does not match ${versionPackagePath} version ${version}`);
263 }
264
265 await rm(releaseDir, { recursive: true, force: true });
266 await mkdir(releaseDir, { recursive: true });
267
268 await runCommand({
269 command: "bun",
270 args: ["run", "src/build.ts", "binary"],
271 cwd: cliRoot,
272 });
273
274 await runCommand({
275 command: "bun",
276 args: ["run", "src/build.ts", "release-assets"],
277 cwd: cliRoot,
278 });
279
280 const wrapperArchivePath = await packWrapperPackage();
281 const assetPaths = await collectReleaseAssetPaths(wrapperArchivePath);
282
283 console.log(`Prepared executor@${version} for ${channel}`);
284 for (const assetPath of assetPaths) {
285 console.log(`- ${assetPath}`);
286 }
287
288 if (options.dryRun) {
289 return;
290 }
291
292 await syncGitHubRelease({
293 tag,
294 channel,
295 assetPaths,
296 });
297
298 await runCommand({
299 command: "bun",
300 args: ["run", "src/build.ts", "publish", channel],
301 cwd: cliRoot,
302 });
303};
304
305await main();

Callers 1

release.tsFile · 0.70

Calls 10

readVersionFunction · 0.85
validateVersionFunction · 0.85
packWrapperPackageFunction · 0.85
collectReleaseAssetPathsFunction · 0.85
syncGitHubReleaseFunction · 0.85
logMethod · 0.80
parseArgsFunction · 0.70
resolveChannelFunction · 0.70
runCommandFunction · 0.70

Tested by

no test coverage detected