feat: add safe Gitea sync and signed updates
This commit is contained in:
@@ -25,7 +25,19 @@ for (const kind of ["Setup", "Portable"]) {
|
||||
}
|
||||
const commit = String(process.env.FORGEFLOW_BUILD_COMMIT || (await execFileAsync("git", ["rev-parse", "HEAD"], { cwd: root })).stdout).trim();
|
||||
const buildId = String(process.env.FORGEFLOW_BUILD_ID || `${manifest.version}-${commit.slice(0, 12)}`);
|
||||
const provenance = { schemaVersion: 1, product: "ForgeFlow", version: manifest.version, commit, buildId, createdAt: new Date().toISOString(), signedRelease: process.env.FORGEFLOW_SIGNED_RELEASE === "1", expectedPublisher: process.env.FORGEFLOW_EXPECTED_PUBLISHER || null, artifacts };
|
||||
const provenance = {
|
||||
schemaVersion: 1,
|
||||
product: "ForgeFlow",
|
||||
version: manifest.version,
|
||||
commit,
|
||||
buildId,
|
||||
createdAt: new Date().toISOString(),
|
||||
publisherManifestSignature: "Ed25519",
|
||||
authenticodeSigned: process.env.FORGEFLOW_SIGNED_RELEASE === "1",
|
||||
expectedAuthenticodePublisher:
|
||||
process.env.FORGEFLOW_EXPECTED_PUBLISHER || null,
|
||||
artifacts,
|
||||
};
|
||||
await writeFile(path.join(root, "dist", `ForgeFlow-${manifest.version}-provenance.json`), `${JSON.stringify(provenance, null, 2)}\n`, "utf8");
|
||||
const lock = JSON.parse(await readFile(path.join(root, "package-lock.json"), "utf8"));
|
||||
const components = Object.entries(lock.packages || {}).filter(([name]) => name.startsWith("node_modules/")).map(([name, value]) => ({ type: "library", name: name.slice(13), version: value.version || "unknown", licenses: value.license ? [{ license: { id: value.license } }] : undefined })).sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
Reference in New Issue
Block a user