Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(release): sync generated iOS project version

tianma-iff82de3341fd0
diff --git a/apps/ios/EdgeEver.xcodeproj/project.pbxproj b/apps/ios/EdgeEver.xcodeproj/project.pbxproj
index ea5c3918..74aae07a 100644
--- a/apps/ios/EdgeEver.xcodeproj/project.pbxproj
+++ b/apps/ios/EdgeEver.xcodeproj/project.pbxproj
@@ -795,7 +795,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
- MARKETING_VERSION = 1.79.0;
+ MARKETING_VERSION = 1.80.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -885,7 +885,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
- MARKETING_VERSION = 1.79.0;
+ MARKETING_VERSION = 1.80.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
diff --git a/scripts/release.mjs b/scripts/release.mjs
index 56049903..e6662738 100644
--- a/scripts/release.mjs
+++ b/scripts/release.mjs
@@ -550,6 +550,22 @@ export const updateIosMarketingVersion = (contents, nextVersion) => {
return updated;
};
+export const updateIosProjectMarketingVersion = (contents, nextVersion) => {
+ const updated = String(contents).replace(
+ /MARKETING_VERSION = [^;]+;/g,
+ `MARKETING_VERSION = ${nextVersion};`,
+ );
+ const matches = updated.match(
+ new RegExp(`MARKETING_VERSION = ${nextVersion.replaceAll(".", "\\.")};`, "g"),
+ );
+ if (!matches || matches.length < 2) {
+ throw new Error(
+ "Unable to update apps/ios/EdgeEver.xcodeproj/project.pbxproj MARKETING_VERSION.",
+ );
+ }
+ return updated;
+};
+
const updateReleaseVersions = ({
nextVersion,
desktopRebuild,
@@ -587,11 +603,19 @@ const updateReleaseVersions = ({
if (iosRebuild) {
const iosVersionPath = "apps/ios/Config/Version.xcconfig";
+ const iosProjectPath = "apps/ios/EdgeEver.xcodeproj/project.pbxproj";
writeFileSync(
iosVersionPath,
updateIosMarketingVersion(readFileSync(iosVersionPath, "utf8"), nextVersion),
);
- changedPaths.push(iosVersionPath);
+ writeFileSync(
+ iosProjectPath,
+ updateIosProjectMarketingVersion(
+ readFileSync(iosProjectPath, "utf8"),
+ nextVersion,
+ ),
+ );
+ changedPaths.push(iosVersionPath, iosProjectPath);
}
return changedPaths;
};
diff --git a/scripts/release.test.mjs b/scripts/release.test.mjs
index db80afb6..bcfa106e 100644
--- a/scripts/release.test.mjs
+++ b/scripts/release.test.mjs
@@ -11,6 +11,7 @@ import {
nextVersion,
parseReleaseCheckpoint,
updateIosMarketingVersion,
+ updateIosProjectMarketingVersion,
parseReleaseArgs,
playDeliveryResumeAction,
playDeliveryFailureStrategy,
@@ -123,6 +124,19 @@ describe("release automation", () => {
).toContain("MARKETING_VERSION = 1.79.0");
});
+ test("keeps the generated iOS project aligned with the Release tag", () => {
+ const updated = updateIosProjectMarketingVersion(
+ [
+ "MARKETING_VERSION = 1.79.0;",
+ "MARKETING_VERSION = 1.79.0;",
+ ].join("\n"),
+ "1.80.0",
+ );
+
+ expect(updated.match(/MARKETING_VERSION = 1\.80\.0;/g)).toHaveLength(2);
+ expect(updated).not.toContain("MARKETING_VERSION = 1.79.0;");
+ });
+
test("restores an exact Draft checkpoint without exposing it in Issue text", () => {
const checkpoint = { releaseSha: "abc", desktopRunId: 123 };
const body = `<!-- edgeever-release-checkpoint:v1.42.0\n${JSON.stringify(checkpoint)}\n-->`;