mirror of
https://github.com/openclaw/openclaw.git
synced 2026-09-28 14:12:28 +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
65 lines
2.0 KiB
TypeScript
65 lines
2.0 KiB
TypeScript
// Android version test support provides shared fixtures for Android script tests.
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { afterEach } from "vitest";
|
|
import { useAutoCleanupTempDirTracker } from "../helpers/temp-dir.js";
|
|
|
|
let tempDirs: ReturnType<typeof useAutoCleanupTempDirTracker>;
|
|
|
|
export function installAndroidFixtureCleanup(): void {
|
|
tempDirs = useAutoCleanupTempDirTracker(afterEach);
|
|
}
|
|
|
|
export function writeAndroidFixture(params: {
|
|
version: string;
|
|
versionCode: number;
|
|
changelog?: string;
|
|
releaseNotes?: string;
|
|
packageVersion?: string;
|
|
versionProperties?: string;
|
|
prefix?: string;
|
|
}): string {
|
|
const rootDir = tempDirs.make(params.prefix ?? "openclaw-android-version-");
|
|
fs.mkdirSync(path.join(rootDir, "apps", "android", "Config"), { recursive: true });
|
|
fs.mkdirSync(path.join(rootDir, "apps", "android", "fastlane", "metadata", "android", "en-US"), {
|
|
recursive: true,
|
|
});
|
|
fs.writeFileSync(
|
|
path.join(rootDir, "package.json"),
|
|
`${JSON.stringify({ version: params.packageVersion ?? "2026.6.2" }, null, 2)}\n`,
|
|
"utf8",
|
|
);
|
|
fs.writeFileSync(
|
|
path.join(rootDir, "apps", "android", "version.json"),
|
|
`${JSON.stringify({ version: params.version, versionCode: params.versionCode }, null, 2)}\n`,
|
|
"utf8",
|
|
);
|
|
const releaseNotes =
|
|
"OpenClaw is now available on Android.\n\nConnect to your OpenClaw Gateway.\n";
|
|
fs.writeFileSync(
|
|
path.join(rootDir, "apps", "android", "CHANGELOG.md"),
|
|
params.changelog ?? `# OpenClaw Android Changelog\n\n## Unreleased\n\n${releaseNotes}`,
|
|
"utf8",
|
|
);
|
|
fs.writeFileSync(
|
|
path.join(rootDir, "apps", "android", "Config", "Version.properties"),
|
|
params.versionProperties ?? "",
|
|
"utf8",
|
|
);
|
|
fs.writeFileSync(
|
|
path.join(
|
|
rootDir,
|
|
"apps",
|
|
"android",
|
|
"fastlane",
|
|
"metadata",
|
|
"android",
|
|
"en-US",
|
|
"release_notes.txt",
|
|
),
|
|
params.releaseNotes ?? releaseNotes,
|
|
"utf8",
|
|
);
|
|
return rootDir;
|
|
}
|