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",
|
"kind": "clusterflux-filtered-public-tree",
|
||||||
"source_commit": "45bbc215f681e4dd414c4919263626ecee018abe",
|
"source_commit": "33ad736f0817e8e0ae4043a4c91f198115364d9f",
|
||||||
"release_name": "release-45bbc215f681",
|
"release_name": "release-33ad736f0817",
|
||||||
"filtered_out": [
|
"filtered_out": [
|
||||||
"private/**",
|
"private/**",
|
||||||
"internal/**",
|
"internal/**",
|
||||||
|
|
|
||||||
|
|
@ -947,7 +947,6 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
|
||||||
}
|
}
|
||||||
|
|
||||||
run("git", ["init"], { cwd: publicTree });
|
run("git", ["init"], { cwd: publicTree });
|
||||||
run("git", ["checkout", "-B", publicRepoBranch], { cwd: publicTree });
|
|
||||||
run("git", ["config", "user.name", "Clusterflux release"], {
|
run("git", ["config", "user.name", "Clusterflux release"], {
|
||||||
cwd: publicTree,
|
cwd: publicTree,
|
||||||
});
|
});
|
||||||
|
|
@ -955,10 +954,29 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
|
||||||
cwd: publicTree,
|
cwd: publicTree,
|
||||||
});
|
});
|
||||||
run("git", ["add", "."], { cwd: publicTree });
|
run("git", ["add", "."], { cwd: publicTree });
|
||||||
|
const tree = commandOutput("git", ["write-tree"], { cwd: publicTree });
|
||||||
|
run("git", ["remote", "add", "public", remote], { cwd: publicTree });
|
||||||
run(
|
run(
|
||||||
"git",
|
"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",
|
"-m",
|
||||||
`Public release ${releaseName}`,
|
`Public release ${releaseName}`,
|
||||||
"-m",
|
"-m",
|
||||||
|
|
@ -968,22 +986,12 @@ function publishPublicTree(releaseName, sourceCommit, publicTreeIdentity) {
|
||||||
],
|
],
|
||||||
{ cwd: publicTree }
|
{ cwd: publicTree }
|
||||||
);
|
);
|
||||||
result.commit = commandOutput("git", ["rev-parse", "HEAD"], { cwd: publicTree });
|
run("git", ["update-ref", `refs/heads/${publicRepoBranch}`, result.commit], {
|
||||||
run("git", ["remote", "add", "public", remote], { cwd: publicTree });
|
cwd: publicTree,
|
||||||
const pushArgs = ["push", "public", `HEAD:${publicRepoBranch}`];
|
});
|
||||||
if (boolEnv("CLUSTERFLUX_PUBLIC_REPO_PUSH_FORCE_WITH_LEASE")) {
|
run("git", ["push", "public", `${result.commit}:${publicRepoBranch}`], {
|
||||||
run(
|
cwd: publicTree,
|
||||||
"git",
|
});
|
||||||
[
|
|
||||||
"fetch",
|
|
||||||
"public",
|
|
||||||
`refs/heads/${publicRepoBranch}:refs/remotes/public/${publicRepoBranch}`,
|
|
||||||
],
|
|
||||||
{ cwd: publicTree }
|
|
||||||
);
|
|
||||||
pushArgs.splice(1, 0, "--force-with-lease");
|
|
||||||
}
|
|
||||||
run("git", pushArgs, { cwd: publicTree });
|
|
||||||
result.pushed = true;
|
result.pushed = true;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue