mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
chore(ios): generate release artifacts locally
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
normalizeGatewayVersionToPinnedIosVersion,
|
||||
normalizePinnedIosVersion,
|
||||
renderIosReleaseNotes,
|
||||
renderIosVersionXcconfig,
|
||||
resolveGatewayVersionForIosRelease,
|
||||
resolveIosVersion,
|
||||
} from "../../scripts/lib/ios-version.ts";
|
||||
@@ -99,6 +98,35 @@ describe("resolveIosVersion", () => {
|
||||
expect(result.stderr).toBe("");
|
||||
});
|
||||
|
||||
it("prints derived release notes from the CLI", () => {
|
||||
const rootDir = writeIosFixture({
|
||||
packageVersion: "2026.4.6",
|
||||
changelog: "# OpenClaw iOS Changelog\n\n## 2026.4.7\n\nGenerated notes.\n",
|
||||
});
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[
|
||||
"--import",
|
||||
"tsx",
|
||||
"scripts/ios-version.ts",
|
||||
"--root",
|
||||
rootDir,
|
||||
"--version",
|
||||
"2026.4.7",
|
||||
"--field",
|
||||
"releaseNotes",
|
||||
],
|
||||
{
|
||||
cwd: process.cwd(),
|
||||
encoding: "utf8",
|
||||
},
|
||||
);
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout).toBe("Generated notes.\n");
|
||||
expect(result.stderr).toBe("");
|
||||
});
|
||||
|
||||
it("rejects missing iOS sync CLI root values before reading version files", () => {
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
@@ -136,10 +164,8 @@ describe("resolveIosVersion", () => {
|
||||
canonicalVersion: "2026.4.6",
|
||||
changelogPath: path.join(rootDir, "apps/ios/CHANGELOG.md"),
|
||||
marketingVersion: "2026.4.6",
|
||||
releaseNotesPath: path.join(rootDir, "apps/ios/fastlane/metadata/en-US/release_notes.txt"),
|
||||
versionSource: "package",
|
||||
versionSourcePath: path.join(rootDir, "package.json"),
|
||||
versionXcconfigPath: path.join(rootDir, "apps/ios/Config/Version.xcconfig"),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -212,20 +238,6 @@ describe("gateway version normalization", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("renderIosVersionXcconfig", () => {
|
||||
it("renders checked-in defaults from the package-derived iOS version", () => {
|
||||
const rootDir = writeIosFixture({
|
||||
packageVersion: "2026.4.8",
|
||||
changelog: "# OpenClaw iOS Changelog\n\n## 2026.4.8\n\nNotes.\n",
|
||||
});
|
||||
const version = resolveIosVersion(rootDir);
|
||||
|
||||
expect(renderIosVersionXcconfig(version)).toContain("OPENCLAW_IOS_VERSION = 2026.4.8");
|
||||
expect(renderIosVersionXcconfig(version)).toContain("OPENCLAW_MARKETING_VERSION = 2026.4.8");
|
||||
expect(renderIosVersionXcconfig(version)).toContain("OPENCLAW_BUILD_VERSION = 1");
|
||||
});
|
||||
});
|
||||
|
||||
describe("release note extraction", () => {
|
||||
it("extracts exact pinned version sections first", () => {
|
||||
const rootDir = writeIosFixture({
|
||||
|
||||
Reference in New Issue
Block a user