Sync public tree to 88f6299
This commit is contained in:
parent
882bc51a9f
commit
4cbb695e42
3 changed files with 17 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"kind": "disasmer-filtered-public-tree",
|
"kind": "disasmer-filtered-public-tree",
|
||||||
"source_commit": "5375c152bd76192d0bd8422f42e9a7c49601b10c",
|
"source_commit": "88f62991331b5bdcc4d120c833996042aaebbfd9",
|
||||||
"release_name": "dryrun-5375c152bd76",
|
"release_name": "dryrun-88f62991331b",
|
||||||
"filtered_out": [
|
"filtered_out": [
|
||||||
"private/**",
|
"private/**",
|
||||||
"experiments/**",
|
"experiments/**",
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ for (const [name, pattern] of [
|
||||||
|
|
||||||
for (const [name, pattern] of [
|
for (const [name, pattern] of [
|
||||||
["preflight rejects stale release manifests", /manifest\.source_commit[\s\S]*currentSourceCommit/],
|
["preflight rejects stale release manifests", /manifest\.source_commit[\s\S]*currentSourceCommit/],
|
||||||
|
["preflight disables interactive remote prompts", /function nonInteractiveEnv[\s\S]*GIT_TERMINAL_PROMPT[\s\S]*GIT_ASKPASS[\s\S]*SSH_ASKPASS[\s\S]*git", \["ls-remote"[\s\S]*timeout/],
|
||||||
["preflight accepts external public tree push", /function publicTreeAlreadyPushed\(manifest\)[\s\S]*DISASMER_PUBLIC_TREE_ALREADY_PUSHED/],
|
["preflight accepts external public tree push", /function publicTreeAlreadyPushed\(manifest\)[\s\S]*DISASMER_PUBLIC_TREE_ALREADY_PUSHED/],
|
||||||
["preflight verifies public branch commit", /remoteMain[\s\S]*publicTreeCommit/],
|
["preflight verifies public branch commit", /remoteMain[\s\S]*publicTreeCommit/],
|
||||||
["preflight verifies local asset checksums", /parseSha256Sums[\s\S]*checksum mismatch/],
|
["preflight verifies local asset checksums", /parseSha256Sums[\s\S]*checksum mismatch/],
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,16 @@ function commandOutput(command, args, options = {}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function nonInteractiveEnv(extra = {}) {
|
||||||
|
return {
|
||||||
|
...process.env,
|
||||||
|
GIT_TERMINAL_PROMPT: "0",
|
||||||
|
GIT_ASKPASS: process.env.GIT_ASKPASS || "/bin/false",
|
||||||
|
SSH_ASKPASS: process.env.SSH_ASKPASS || "/bin/false",
|
||||||
|
...extra,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function expectedSourceCommit() {
|
function expectedSourceCommit() {
|
||||||
return (
|
return (
|
||||||
process.env.DISASMER_ACCEPTANCE_COMMIT ||
|
process.env.DISASMER_ACCEPTANCE_COMMIT ||
|
||||||
|
|
@ -62,7 +72,10 @@ function parseSha256Sums(file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function remoteHead(remote) {
|
function remoteHead(remote) {
|
||||||
const output = commandOutput("git", ["ls-remote", remote, "HEAD", "refs/heads/main"]);
|
const output = commandOutput("git", ["ls-remote", remote, "HEAD", "refs/heads/main"], {
|
||||||
|
env: nonInteractiveEnv(),
|
||||||
|
timeout: Number(process.env.DISASMER_PUBLIC_REPO_REMOTE_TIMEOUT_MS || 30000),
|
||||||
|
});
|
||||||
if (!output) return null;
|
if (!output) return null;
|
||||||
const lines = output.split(/\r?\n/).filter(Boolean);
|
const lines = output.split(/\r?\n/).filter(Boolean);
|
||||||
const head = lines.find((line) => line.endsWith("\tHEAD")) || lines[0];
|
const head = lines.find((line) => line.endsWith("\tHEAD")) || lines[0];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue