Skip to content

Commit 5309304

Browse files
committed
fix: add checkpoints and peer snaps files to release artifacts
1 parent d0dcd9b commit 5309304

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nix/binary-release.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ let
3232
AlonzoGenesisFile = "alonzo-genesis.json";
3333
} // lib.optionalAttrs (env.nodeConfig ? ConwayGenesisFile) {
3434
ConwayGenesisFile = "conway-genesis.json";
35+
} // lib.optionalAttrs (env.nodeConfig ? CheckpointsFile) {
36+
CheckpointsFile = "checkpoints.json";
3537
};
3638
nodeConfig = pkgs.writeText
3739
"config.json"
@@ -43,6 +45,10 @@ let
4345
(builtins.toJSON
4446
(env.nodeConfigBp // genesisAttrs));
4547

48+
peerSnapshot = pkgs.writeText
49+
"peer-snapshot.json"
50+
(builtins.toJSON env.peerSnapshot);
51+
4652
topologyConfig = pkgs.cardanoLib.mkTopology env;
4753

4854
# Genesis files are the same for env.nodeConfig and env.nodeConfigBp
@@ -54,6 +60,7 @@ let
5460
mkdir -p "share/${name}"
5561
jq . < "${nodeConfig}" > share/${name}/config.json
5662
jq . < "${nodeConfigBp}" > share/${name}/config-bp.json
63+
jq . < "${peerSnapshot}" > share/${name}/peer-snapshot.json
5764
jq . < "${topologyConfig}" > share/${name}/topology.json
5865
cp -n --remove-destination -v \
5966
"${ByronGenesisFile}" \
@@ -69,6 +76,11 @@ let
6976
"${env.nodeConfig.ConwayGenesisFile}" \
7077
share/${name}/conway-genesis.json
7178
''}
79+
${lib.optionalString (env.nodeConfig ? CheckpointsFile) ''
80+
cp -n --remove-destination -v \
81+
"${env.nodeConfig.CheckpointsFile}" \
82+
share/${name}/checkpoints.json
83+
''}
7284
'';
7385

7486
in pkgs.runCommand name {

0 commit comments

Comments
 (0)