forked from mtusi2026/mtusi2026lab7
Prepare verified laboratory 7 implementation and evidence
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { run, safeFailure, privateWrite, local } from "./runtime";
|
||||
import { resolve } from "node:path";
|
||||
let stage = "GO_FORMAT";
|
||||
try {
|
||||
await run([
|
||||
"/home/rey/.local/share/mise/installs/go/1.27.2/bin/gofmt",
|
||||
"-w",
|
||||
"scripts/s3-control.go",
|
||||
]);
|
||||
stage = "DASHBOARD_GENERATE";
|
||||
await run([process.execPath, "scripts/telemetry-dashboard.ts"]);
|
||||
stage = "NATIVE_FORMAT";
|
||||
await run([process.execPath, "scripts/format-check.ts", "--write"]);
|
||||
stage = "NONWRITING_SOURCE_CHECKS";
|
||||
await run([process.execPath, "scripts/validate-source.ts"]);
|
||||
stage = "EXACT_BINARY_BUILD";
|
||||
await run([process.execPath, "scripts/preflight-build.ts"]);
|
||||
console.log("PASS_FINAL_NONWRITING_CHECKS_AND_EXACT_BINARY_BUILD");
|
||||
} catch (error) {
|
||||
await Promise.allSettled([
|
||||
Promise.resolve().then(() =>
|
||||
privateWrite(
|
||||
resolve(local, "diagnostics/final-source-check-error.json"),
|
||||
JSON.stringify({
|
||||
stage,
|
||||
message: error instanceof Error ? error.message : "UNKNOWN",
|
||||
}),
|
||||
),
|
||||
),
|
||||
]);
|
||||
safeFailure(error);
|
||||
}
|
||||
Reference in New Issue
Block a user