Skip to content

Commit 3de3049

Browse files
Merge pull request #214 from mendix/MOO-2258-Make-it-native-release-pipeline-fixes
[MOO-2258] make it native release pipeline script fixes
2 parents 3598506 + c849394 commit 3de3049

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

scripts/release-make-it-native.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const DOCS_REPO_OWNER = "MendixMobile";
3737
const DOCS_UPSTREAM_OWNER = "mendix";
3838
const DOCS_BRANCH_NAME = `update-mobile-release-notes-v${MIN_VERSION}`;
3939
const TARGET_FILE =
40-
"content/en/docs/releasenotes/mobile/make-it-native-parent/make-it-native-10.md";
40+
"content/en/docs/releasenotes/mobile/make-it-native-parent/make-it-native.md";
4141

4242
const octokit = new Octokit({ auth: GITHUB_PAT });
4343

@@ -116,11 +116,15 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) {
116116
month: "short",
117117
day: "numeric",
118118
});
119-
const title = `## ${MIN_VERSION}\n\n**Release date: ${formattedDate}**`;
119+
const title = `## Android ${MIN_VERSION} / iOS ${MIN_VERSION}\n\n**Release date: ${formattedDate}**`;
120120

121121
return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`;
122122
}
123123

124+
// This file exists only in the fork (MendixMobile/docs) and not in upstream (mendix/docs).
125+
// Removing it in our branch ensures it doesn't appear in the cross-fork PR diff.
126+
const FORK_SYNC_FILE = ".github/workflows/sync.yml";
127+
124128
async function cloneDocsRepo() {
125129
const git = simpleGit();
126130

@@ -144,6 +148,10 @@ async function updateDocsMiNReleaseNotes(unreleasedContent) {
144148
}
145149

146150
async function createPRUpdateDocsMiNReleaseNotes(git) {
151+
// Remove the fork's sync.yml so it doesn't appear in the cross-fork PR diff.
152+
if (fs.existsSync(FORK_SYNC_FILE)) {
153+
await git.rm(FORK_SYNC_FILE);
154+
}
147155
await git.add(TARGET_FILE);
148156
await git.commit(`docs: update mobile release notes for v${MIN_VERSION}`);
149157
await git.push("origin", DOCS_BRANCH_NAME, ["--force"]);

0 commit comments

Comments
 (0)