@mutmutco/cli 2.20.1 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +15 -4
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -7190,6 +7190,7 @@ var ORG_SPINE_FILES = [
|
|
|
7190
7190
|
function isSpinePath(path2) {
|
|
7191
7191
|
return ORG_SPINE_FILES.includes(path2);
|
|
7192
7192
|
}
|
|
7193
|
+
var RELEASE_TOLERATED_PATHS = [".gitignore"];
|
|
7193
7194
|
async function predictMergeConflicts(deps, ours, theirs) {
|
|
7194
7195
|
try {
|
|
7195
7196
|
await deps.run("git", ["merge-tree", "--write-tree", "--name-only", "--no-messages", ours, theirs]);
|
|
@@ -7594,8 +7595,9 @@ async function runTrainApply(command, deps, options = {}) {
|
|
|
7594
7595
|
const deployModel2 = await preflight(deps, ctx, "main", meta);
|
|
7595
7596
|
const tag2 = requireValue(clean(await deps.run("node", ["scripts/next-version.mjs", "cycle"])), "release tag");
|
|
7596
7597
|
const foldPaths2 = await resolveFoldPaths(deps, deployModel2);
|
|
7598
|
+
const tolerated2 = [...foldPaths2, ...RELEASE_TOLERATED_PATHS];
|
|
7597
7599
|
const predicted2 = await predictMergeConflicts(deps, "origin/main", "origin/development");
|
|
7598
|
-
const predictedBlocking2 = predicted2.filter((f) => !isSpinePath(f) && !
|
|
7600
|
+
const predictedBlocking2 = predicted2.filter((f) => !isSpinePath(f) && !tolerated2.includes(f));
|
|
7599
7601
|
if (predictedBlocking2.length > 0) {
|
|
7600
7602
|
throw new Error(
|
|
7601
7603
|
`development -> main merge would conflict on non-spine path(s): ${predictedBlocking2.join(", ")} \u2014 no merge was started. The train is misaligned: reconcile main and development via an approved alignment PR, then rerun release.`
|
|
@@ -7606,7 +7608,7 @@ async function runTrainApply(command, deps, options = {}) {
|
|
|
7606
7608
|
if (predicted2.length === 0) {
|
|
7607
7609
|
await deps.run("git", ["merge", "development", "--no-edit"]);
|
|
7608
7610
|
} else {
|
|
7609
|
-
await mergeWithSpineResolution(deps, "development", "development -> main", "theirs",
|
|
7611
|
+
await mergeWithSpineResolution(deps, "development", "development -> main", "theirs", tolerated2);
|
|
7610
7612
|
}
|
|
7611
7613
|
const versionFold2 = await foldReleaseVersion(deps, deployModel2, tag2, foldPaths2);
|
|
7612
7614
|
const releaseSha2 = requireValue(clean(await deps.run("git", ["rev-parse", "main"])), "release sha");
|
|
@@ -7650,8 +7652,9 @@ async function runTrainApply(command, deps, options = {}) {
|
|
|
7650
7652
|
);
|
|
7651
7653
|
const deployModel = await preflight(deps, ctx, "main", meta);
|
|
7652
7654
|
const foldPaths = await resolveFoldPaths(deps, deployModel);
|
|
7655
|
+
const tolerated = [...foldPaths, ...RELEASE_TOLERATED_PATHS];
|
|
7653
7656
|
const predicted = await predictMergeConflicts(deps, "origin/main", "origin/rc");
|
|
7654
|
-
const predictedBlocking = predicted.filter((f) => !isSpinePath(f) && !
|
|
7657
|
+
const predictedBlocking = predicted.filter((f) => !isSpinePath(f) && !tolerated.includes(f));
|
|
7655
7658
|
if (predictedBlocking.length > 0) {
|
|
7656
7659
|
throw new Error(
|
|
7657
7660
|
`rc -> main merge would conflict on non-spine path(s): ${predictedBlocking.join(", ")} \u2014 no merge was started. The train is misaligned: reconcile main and rc via an approved alignment PR (do not hand-resolve on main), then rerun release.`
|
|
@@ -7670,7 +7673,7 @@ async function runTrainApply(command, deps, options = {}) {
|
|
|
7670
7673
|
if (predicted.length === 0) {
|
|
7671
7674
|
await deps.run("git", ["merge", "rc", "--no-edit"]);
|
|
7672
7675
|
} else {
|
|
7673
|
-
await mergeWithSpineResolution(deps, "rc", "rc -> main", "theirs",
|
|
7676
|
+
await mergeWithSpineResolution(deps, "rc", "rc -> main", "theirs", tolerated);
|
|
7674
7677
|
}
|
|
7675
7678
|
const tag = requireValue(clean(await deps.run("node", ["scripts/next-version.mjs", "release"])), "release tag");
|
|
7676
7679
|
const versionFold = await foldReleaseVersion(deps, deployModel, tag, foldPaths);
|
|
@@ -7689,6 +7692,13 @@ async function runTrainApply(command, deps, options = {}) {
|
|
|
7689
7692
|
await deps.run("git", ["pull", "--ff-only", "origin", "development"]);
|
|
7690
7693
|
await deps.run("git", ["merge", "main", "--no-edit"]);
|
|
7691
7694
|
await deps.run("git", ["push", "origin", "development"]);
|
|
7695
|
+
let rcAlignment;
|
|
7696
|
+
try {
|
|
7697
|
+
await deps.run("git", ["push", "origin", "main:rc"]);
|
|
7698
|
+
rcAlignment = "origin/rc aligned to the released main";
|
|
7699
|
+
} catch (e) {
|
|
7700
|
+
rcAlignment = `rc alignment push failed \u2014 align manually with \`git push origin main:rc\`: ${e instanceof Error ? e.message : String(e)}`;
|
|
7701
|
+
}
|
|
7692
7702
|
const environments = await buildEnvironments(deps, ctx, deployModel, d.deployStatus, retirement);
|
|
7693
7703
|
return {
|
|
7694
7704
|
...ctx,
|
|
@@ -7708,6 +7718,7 @@ async function runTrainApply(command, deps, options = {}) {
|
|
|
7708
7718
|
rcRetirement: retirement.status,
|
|
7709
7719
|
rcRetirementNote: retirement.note,
|
|
7710
7720
|
rcRetirementCategory: retirement.category,
|
|
7721
|
+
rcAlignment,
|
|
7711
7722
|
announceNote,
|
|
7712
7723
|
release: { tag, url: releaseUrl, targetSha: releaseSha },
|
|
7713
7724
|
environments
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutmutco/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "MMI Future CLI — delivers the org rules (whole-file), plus saga and KB access. The cross-IDE engine the plugin's SessionStart hook drives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|