mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-02 18:30:52 +08:00
Add manually triggered iOS Store Release and Android Store Release workflows with the same local release commands. Derive store versions and OpenAI release notes at build time, retain recovery artifacts, and avoid generated metadata commits. Pin queued releases to their dispatch commit, qualify native iOS behavior before signing, and improve Android screenshots and interrupted artifact recovery. Validation includes focused release/planner tests, workflow and type checks, native iOS qualification, Android screenshot capture, and historical release-note exercises. CI failure attribution and remaining hosted release verification are documented in the PR. Closes #158806
66 lines
1.9 KiB
TypeScript
66 lines
1.9 KiB
TypeScript
// Android Version script supports OpenClaw repository automation.
|
|
import {
|
|
resolveAndroidVersion,
|
|
resolveAndroidBuildVersion,
|
|
resolveGatewayVersionForAndroidRelease,
|
|
} from "./lib/android-version.ts";
|
|
import { parseVersionQueryArgs } from "./lib/version-script-args.ts";
|
|
|
|
function printUsage(): void {
|
|
process.stdout.write(
|
|
"Usage: node --import tsx scripts/android-version.ts [--json|--shell] [--field name] [--from-gateway|--for-build] [--root dir]\n\n",
|
|
);
|
|
}
|
|
|
|
function main(argv = process.argv.slice(2)): number {
|
|
const fromGateway = argv.includes("--from-gateway");
|
|
const forBuild = argv.includes("--for-build");
|
|
const options = parseVersionQueryArgs(
|
|
argv.filter((arg) => !["--from-gateway", "--for-build"].includes(arg)),
|
|
);
|
|
if (options.help) {
|
|
printUsage();
|
|
return 0;
|
|
}
|
|
|
|
if (fromGateway) {
|
|
process.stdout.write(
|
|
`${JSON.stringify(resolveGatewayVersionForAndroidRelease(options.rootDir), null, 2)}\n`,
|
|
);
|
|
return 0;
|
|
}
|
|
|
|
const version = forBuild
|
|
? resolveAndroidBuildVersion(options.rootDir)
|
|
: resolveAndroidVersion(options.rootDir);
|
|
|
|
if (options.field) {
|
|
const value = version[options.field as keyof typeof version];
|
|
if (value === undefined) {
|
|
throw new Error(`Unknown Android version field '${options.field}'.`);
|
|
}
|
|
process.stdout.write(`${value}\n`);
|
|
return 0;
|
|
}
|
|
|
|
if (options.format === "shell") {
|
|
process.stdout.write(
|
|
[
|
|
`OPENCLAW_ANDROID_VERSION_NAME=${version.canonicalVersion}`,
|
|
`OPENCLAW_ANDROID_VERSION_CODE=${version.versionCode}`,
|
|
`OPENCLAW_ANDROID_WEAR_VERSION_CODE=${version.wearVersionCode}`,
|
|
].join("\n") + "\n",
|
|
);
|
|
} else {
|
|
process.stdout.write(`${JSON.stringify(version, null, 2)}\n`);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
try {
|
|
process.exitCode = main();
|
|
} catch (error) {
|
|
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
process.exitCode = 1;
|
|
}
|