Public release release-33ad736f0817
Source commit: 33ad736f0817e8e0ae4043a4c91f198115364d9f Public tree identity: sha256:0cd6003e496f9ef3277fdc86d0fda9744847faadc37fe754af526b8b92863e8b
This commit is contained in:
parent
3f88254c70
commit
93346dd9fc
2 changed files with 28 additions and 20 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"kind": "clusterflux-filtered-public-tree",
|
||||
"source_commit": "45bbc215f681e4dd414c4919263626ecee018abe",
|
||||
"release_name": "release-45bbc215f681",
|
||||
"source_commit": "33ad736f0817e8e0ae4043a4c91f198115364d9f",
|
||||
"release_name": "release-33ad736f0817",
|
||||
"filtered_out": [
|
||||
"private/**",
|
||||
"internal/**",
|
||||
|
|
|
|||
|
|
@ -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,23 +954,8 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
|
|||
cwd: publicTree,
|
||||
});
|
||||
run("git", ["add", "."], { cwd: publicTree });
|
||||
run(
|
||||
"git",
|
||||
[
|
||||
"commit",
|
||||
"-m",
|
||||
`Public release ${releaseName}`,
|
||||
"-m",
|
||||
`Source commit: ${sourceCommit}`,
|
||||
"-m",
|
||||
`Public tree identity: ${publicTreeIdentity}`,
|
||||
],
|
||||
{ cwd: publicTree }
|
||||
);
|
||||
result.commit = commandOutput("git", ["rev-parse", "HEAD"], { cwd: publicTree });
|
||||
const tree = commandOutput("git", ["write-tree"], { 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",
|
||||
[
|
||||
|
|
@ -981,9 +965,33 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
|
|||
],
|
||||
{ cwd: publicTree }
|
||||
);
|
||||
pushArgs.splice(1, 0, "--force-with-lease");
|
||||
}
|
||||
run("git", pushArgs, { 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",
|
||||
`Source commit: ${sourceCommit}`,
|
||||
"-m",
|
||||
`Public tree identity: ${publicTreeIdentity}`,
|
||||
],
|
||||
{ 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue