@mutmutco/cli 3.107.0 → 3.107.1
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 +22 -0
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -12053,6 +12053,25 @@ async function alignExistingHotfixReleaseMarker(deps, version) {
|
|
|
12053
12053
|
if (out === "stamped") return `jervaiseRelease hotfix marker stamped for ${version}`;
|
|
12054
12054
|
return null;
|
|
12055
12055
|
}
|
|
12056
|
+
async function clearStaleHotfixReleaseMarker(deps, version) {
|
|
12057
|
+
const script = [
|
|
12058
|
+
"const fs = require('fs');",
|
|
12059
|
+
"const p = 'package.json';",
|
|
12060
|
+
"if (!fs.existsSync(p)) { process.stdout.write('absent'); process.exit(0); }",
|
|
12061
|
+
"const j = JSON.parse(fs.readFileSync(p, 'utf8'));",
|
|
12062
|
+
"const marker = j.jervaiseRelease;",
|
|
12063
|
+
"if (!(marker && typeof marker === 'object' && marker.kind === 'hotfix')) {",
|
|
12064
|
+
" process.stdout.write('skip');",
|
|
12065
|
+
" process.exit(0);",
|
|
12066
|
+
"}",
|
|
12067
|
+
"delete j.jervaiseRelease;",
|
|
12068
|
+
"fs.writeFileSync(p, JSON.stringify(j, null, 2) + '\\n');",
|
|
12069
|
+
"process.stdout.write('cleared');"
|
|
12070
|
+
].join("");
|
|
12071
|
+
const out = (await deps.run("node", ["-e", script])).trim();
|
|
12072
|
+
if (out === "cleared") return `stale jervaiseRelease hotfix marker cleared for train line ${version}`;
|
|
12073
|
+
return null;
|
|
12074
|
+
}
|
|
12056
12075
|
async function installAppFoldDeps(deps) {
|
|
12057
12076
|
const hasLock = await deps.run("git", ["cat-file", "-e", "HEAD:package-lock.json"]).then(() => true).catch(() => false);
|
|
12058
12077
|
await deps.run("npm", hasLock ? ["ci"] : ["install"]);
|
|
@@ -12129,6 +12148,9 @@ async function foldReleaseVersion(deps, model, tag, foldPaths, sourceCommit = "H
|
|
|
12129
12148
|
if (model === "registry-publish" && Number.isFinite(patch) && patch > 0) {
|
|
12130
12149
|
await alignExistingHotfixReleaseMarker(deps, version);
|
|
12131
12150
|
}
|
|
12151
|
+
if (model === "registry-publish" && Number.isFinite(patch) && patch === 0) {
|
|
12152
|
+
await clearStaleHotfixReleaseMarker(deps, version);
|
|
12153
|
+
}
|
|
12132
12154
|
}
|
|
12133
12155
|
for (const path2 of foldPaths) {
|
|
12134
12156
|
await deps.run("git", ["add", "--", path2]).catch(() => void 0);
|
package/package.json
CHANGED