Public release release-33ad736f0817

Source commit: 33ad736f0817e8e0ae4043a4c91f198115364d9f

Public tree identity: sha256:0cd6003e496f9ef3277fdc86d0fda9744847faadc37fe754af526b8b92863e8b
This commit is contained in:
Clusterflux release 2026-07-20 11:17:20 +02:00
parent 3f88254c70
commit 93346dd9fc
2 changed files with 28 additions and 20 deletions

View file

@ -947,7 +947,6 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
}
run("git", ["init"], { cwd: publicTree });
run("git", ["checkout", "-B", publicRepoBranch], { cwd: publicTree });
run("git", ["config", "user.name", "Clusterflux release"], {
cwd: publicTree,
});
@ -955,10 +954,29 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
cwd: publicTree,
});
run("git", ["add", "."], { cwd: publicTree });
const tree = commandOutput("git", ["write-tree"], { cwd: publicTree });
run("git", ["remote", "add", "public", remote], { cwd: publicTree });
run(
"git",
[
"commit",
"fetch",
"public",
`refs/heads/${publicRepoBranch}:refs/remotes/public/${publicRepoBranch}`,
],
{ cwd: publicTree }
);
const parent = commandOutput(
"git",
["rev-parse", `refs/remotes/public/${publicRepoBranch}`],
{ cwd: publicTree }
);
result.commit = commandOutput(
"git",
[
"commit-tree",
tree,
"-p",
parent,
"-m",
`Public release ${releaseName}`,
"-m",
@ -968,22 +986,12 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
],
{ cwd: publicTree }
);
result.commit = commandOutput("git", ["rev-parse", "HEAD"], { cwd: publicTree });
run("git", ["remote", "add", "public", remote], { cwd: publicTree });
const pushArgs = ["push", "public", `HEAD:${publicRepoBranch}`];
if (boolEnv("CLUSTERFLUX_PUBLIC_REPO_PUSH_FORCE_WITH_LEASE")) {
run(
"git",
[
"fetch",
"public",
`refs/heads/${publicRepoBranch}:refs/remotes/public/${publicRepoBranch}`,
],
{ cwd: publicTree }
);
pushArgs.splice(1, 0, "--force-with-lease");
}
run("git", pushArgs, { cwd: publicTree });
run("git", ["update-ref", `refs/heads/${publicRepoBranch}`, result.commit], {
cwd: publicTree,
});
run("git", ["push", "public", `${result.commit}:${publicRepoBranch}`], {
cwd: publicTree,
});
result.pushed = true;
return result;
}