mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 17:53:39 +00:00
* feat(mobile): add dedicated version contract Punchcard-Session: quiet-brook-meadow-cb * fix(mobile): repair version contract checks Punchcard-Session: calm-meadow-summit-7q
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
// Android Sync Versioning script supports OpenClaw repository automation.
|
|
import { checkAndroidVersioning } from "./lib/android-version.ts";
|
|
import { parseVersionSyncArgs } from "./lib/version-script-args.ts";
|
|
|
|
export { parseVersionSyncArgs as parseArgs } from "./lib/version-script-args.ts";
|
|
|
|
function printUsage(): void {
|
|
process.stdout.write(
|
|
"Usage: node --import tsx scripts/android-sync-versioning.ts --check [--require-mobile-release] [--revision n] [--root dir]\n",
|
|
);
|
|
}
|
|
|
|
function main(argv = process.argv.slice(2)): number {
|
|
const requireMobileRelease = argv.includes("--require-mobile-release");
|
|
const options = parseVersionSyncArgs(
|
|
argv.filter((arg) => arg !== "--require-mobile-release"),
|
|
{ allowAppStoreRevision: true },
|
|
);
|
|
if (options.help) {
|
|
printUsage();
|
|
return 0;
|
|
}
|
|
|
|
if (options.mode !== "check") {
|
|
throw new Error(
|
|
"Android version sync is retired. Run the shared mobile cutter in scripts/mobile-release-version.ts.",
|
|
);
|
|
}
|
|
checkAndroidVersioning({
|
|
appStoreRevision: options.appStoreRevision ?? undefined,
|
|
requireMobileRelease,
|
|
rootDir: options.rootDir,
|
|
});
|
|
process.stdout.write("Android versioning artifacts match committed release metadata.\n");
|
|
return 0;
|
|
}
|
|
|
|
try {
|
|
process.exitCode = main();
|
|
} catch (error) {
|
|
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
process.exitCode = 1;
|
|
}
|