mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-29 14:57:05 +00:00
Fix stable release promotion order
This commit is contained in:
@@ -52,15 +52,14 @@ export function renderReleasePrBody(version, baseBranch) {
|
||||
: "Confirm the draft GitHub Release assets; keep stable CLI publication deferred until BRAT validation passes";
|
||||
const holdInstruction = isPrerelease
|
||||
? `Publishing and validating this pre-release does not unblock this pull request. Keep it in draft and unmerged, and leave ${baseBranchCode} unchanged.`
|
||||
: `Publishing the GitHub pre-release does not unblock this pull request. Keep it in draft, and leave ${baseBranchCode} unchanged, until the exact published build has passed BRAT validation. Promotion remains on hold until the exact release commit has been integrated into the repository's default branch.`;
|
||||
: `Publishing the GitHub pre-release does not unblock this pull request. Keep it in draft, and leave ${baseBranchCode} unchanged, until the exact published build has passed BRAT validation. Before the exact release commit reaches the repository's default branch, remove the pre-release designation and make this exact release the latest stable release so Community Directory review does not inspect a manifest version whose GitHub Release remains a pre-release.`;
|
||||
const completionInstructions = isPrerelease
|
||||
? [
|
||||
"- [ ] Keep this pre-release pull request unmerged; close it only through a separate maintainer action",
|
||||
]
|
||||
? ["- [ ] Keep this pre-release pull request unmerged; close it only through a separate maintainer action"]
|
||||
: [
|
||||
`- [ ] After BRAT validation passes, mark this pull request ready and merge it into ${baseBranchCode} with a merge commit`,
|
||||
"- [ ] After BRAT validation passes, remove the pre-release designation and make this exact release the latest stable release",
|
||||
`- [ ] Confirm this exact release is no longer a pre-release, then mark this pull request ready and merge it into ${baseBranchCode} with a merge commit`,
|
||||
"- [ ] Integrate the exact release commit through the reviewed branch chain into the repository's default branch",
|
||||
"- [ ] Confirm the default branch contains the exact release metadata, then remove the pre-release designation and make this exact release the latest stable release",
|
||||
"- [ ] Confirm the default branch contains the exact release commit and metadata",
|
||||
"- [ ] Create the stable CLI tag and publish its `latest` and major-minor image tags, if selected, through a separate maintainer gate",
|
||||
];
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ describe("release workflow", () => {
|
||||
expect(prerelease).not.toContain("Mark this pull request ready and merge it");
|
||||
});
|
||||
|
||||
it("publishes a stable version initially as a GitHub pre-release for BRAT validation", () => {
|
||||
it("promotes a validated stable release before its manifest reaches the default branch", () => {
|
||||
const stable = renderReleasePrBody("1.0.0", "main");
|
||||
|
||||
expect(stable).toContain("prerelease=true");
|
||||
@@ -207,26 +207,33 @@ describe("release workflow", () => {
|
||||
"Publish the GitHub Release initially as a pre-release without replacing the latest stable release"
|
||||
);
|
||||
expect(stable).toContain(
|
||||
"After BRAT validation passes, mark this pull request ready and merge it into `main` with a merge commit"
|
||||
"After BRAT validation passes, remove the pre-release designation and make this exact release the latest stable release"
|
||||
);
|
||||
expect(stable).toContain(
|
||||
"Confirm this exact release is no longer a pre-release, then mark this pull request ready and merge it into `main` with a merge commit"
|
||||
);
|
||||
expect(stable).toContain(
|
||||
"Integrate the exact release commit through the reviewed branch chain into the repository's default branch"
|
||||
);
|
||||
expect(stable).toContain(
|
||||
"Confirm the default branch contains the exact release metadata, then remove the pre-release designation and make this exact release the latest stable release"
|
||||
);
|
||||
expect(stable).toContain("Confirm the default branch contains the exact release commit and metadata");
|
||||
expect(stable).toContain(
|
||||
"Create the stable CLI tag and publish its `latest` and major-minor image tags, if selected, through a separate maintainer gate"
|
||||
);
|
||||
expect(stable).toContain(
|
||||
"Before the exact release commit reaches the repository's default branch, remove the pre-release designation"
|
||||
);
|
||||
expect(stable.indexOf("After BRAT validation passes")).toBeLessThan(
|
||||
stable.indexOf("Confirm this exact release is no longer a pre-release")
|
||||
);
|
||||
expect(stable.indexOf("Confirm this exact release is no longer a pre-release")).toBeLessThan(
|
||||
stable.indexOf("Integrate the exact release commit")
|
||||
);
|
||||
expect(stable.indexOf("Integrate the exact release commit")).toBeLessThan(
|
||||
stable.indexOf("Confirm the default branch contains the exact release metadata")
|
||||
);
|
||||
expect(stable.indexOf("Confirm the default branch contains the exact release metadata")).toBeLessThan(
|
||||
stable.indexOf("Create the stable CLI tag")
|
||||
stable.indexOf("Confirm the default branch contains the exact release commit and metadata")
|
||||
);
|
||||
expect(
|
||||
stable.indexOf("Confirm the default branch contains the exact release commit and metadata")
|
||||
).toBeLessThan(stable.indexOf("Create the stable CLI tag"));
|
||||
expect(stable).not.toContain("prerelease=false");
|
||||
});
|
||||
|
||||
@@ -238,10 +245,13 @@ describe("release workflow", () => {
|
||||
"Keep the release pull request in draft and unmerged after BRAT validation; close it only through a separate maintainer action."
|
||||
);
|
||||
expect(workflow).toContain(
|
||||
"After BRAT validation, merge the release pull request into its reviewed base branch and integrate the exact release commit into the default branch."
|
||||
"After BRAT validation, remove the pre-release designation and make this exact release the latest stable release before its manifest reaches the default branch."
|
||||
);
|
||||
expect(workflow).toContain(
|
||||
"Only after the default branch contains the exact release metadata, remove the pre-release designation and make this exact release the latest stable release."
|
||||
"Confirm the release is no longer a pre-release, then merge the release pull request into its reviewed base branch and integrate the exact release commit into the default branch."
|
||||
);
|
||||
expect(workflow).toContain(
|
||||
"This order prevents Community Directory review from inspecting a stable manifest version while the matching GitHub Release remains a pre-release."
|
||||
);
|
||||
expect(workflow).toContain(
|
||||
'if [[ "${VERSION}" != *-* && "${PRERELEASE}" == "true" && "${PUBLISH_CLI}" == "true" ]]; then'
|
||||
|
||||
Reference in New Issue
Block a user