@tablation/crew 0.67.0 → 0.67.2
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/cli.js +17 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10364,6 +10364,11 @@ ${section}`;
|
|
|
10364
10364
|
return [...lines.slice(0, anchor), section, ...lines.slice(anchor)].join("\n");
|
|
10365
10365
|
}
|
|
10366
10366
|
var RELEASE_COMMIT_SUBJECT = /^Release \S+$/;
|
|
10367
|
+
function subjectsSince(cwd, sha) {
|
|
10368
|
+
if (!isAncestor(cwd, sha, "HEAD")) return null;
|
|
10369
|
+
return (gitOk(cwd, ["log", "--format=%h %s", `${sha}..HEAD`]) ?? "").split("\n").filter(Boolean);
|
|
10370
|
+
}
|
|
10371
|
+
var isReleaseCommitLine = (line) => RELEASE_COMMIT_SUBJECT.test(line.replace(/^\S+ /, ""));
|
|
10367
10372
|
function decideRelease(cwd, tickets, contract, opts = {}) {
|
|
10368
10373
|
const pattern = opts.tagPattern ?? "v*";
|
|
10369
10374
|
const base = opts.base ?? "main";
|
|
@@ -11109,11 +11114,18 @@ async function runReleaseCycle(o, movedPast2) {
|
|
|
11109
11114
|
}
|
|
11110
11115
|
o.state?.clearBlocked();
|
|
11111
11116
|
const failedAt = o.state?.deployFailedSha();
|
|
11112
|
-
if (!o.force && failedAt
|
|
11113
|
-
o.
|
|
11114
|
-
|
|
11115
|
-
)
|
|
11116
|
-
|
|
11117
|
+
if (!o.force && failedAt) {
|
|
11118
|
+
const since2 = failedAt === decision.head ? [] : subjectsSince(o.cwd, failedAt);
|
|
11119
|
+
const real = since2?.filter((l) => !isReleaseCommitLine(l)) ?? null;
|
|
11120
|
+
if (real && real.length === 0) {
|
|
11121
|
+
o.emit.warn(
|
|
11122
|
+
`a deploy already failed on ${failedAt.slice(0, 8)} \u2014 not retrying until a new commit lands ` + (since2.length > 0 ? `(${since2.length} release commit(s) from elsewhere since do not count: ${since2.join("; ")}) ` : "") + "(force it with `crew deploy`)"
|
|
11123
|
+
);
|
|
11124
|
+
return { merged: [], deployed: false, stopped: "previous deploy failed on this commit", decision };
|
|
11125
|
+
}
|
|
11126
|
+
if (real) {
|
|
11127
|
+
o.emit.emit(`deploy guard lifted by ${real.length} new commit(s) since ${failedAt.slice(0, 8)}: ${real.join("; ")}`);
|
|
11128
|
+
}
|
|
11117
11129
|
}
|
|
11118
11130
|
if (o.repo.release.mode === "external") {
|
|
11119
11131
|
o.emit.emit("release.mode is external \u2014 the crew hands work off and does not release");
|
package/package.json
CHANGED