aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-01-31 11:59:14 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-01-31 11:59:14 +0100
commitbb307bd1840b224ece568dfa126adf6f54bcb927 (patch)
treeb993eeb8da8f2b5b5e85bab4243bb0ef9817cb21 /nix
parent26849ed0665cc49a99c98ed084971a7db7201bae (diff)
downloadgarage-bb307bd1840b224ece568dfa126adf6f54bcb927.tar.gz
garage-bb307bd1840b224ece568dfa126adf6f54bcb927.zip
Generate JSON build description
Diffstat (limited to 'nix')
-rw-r--r--nix/build_index.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/nix/build_index.nix b/nix/build_index.nix
index 5107324e..8f5885b3 100644
--- a/nix/build_index.nix
+++ b/nix/build_index.nix
@@ -88,9 +88,11 @@ let
builds = builtins.sort cmpDate (map (x: { version = x; builds = builtins.getAttr x builds_per_version; }) versions_commit);
}
];
-
in
- pkgs.writeText "index.html" ''
+{
+ json = pkgs.writeTextDir "share/_releases.json" (builtins.toJSON sorted_builds);
+
+ html = pkgs.writeTextDir "share/_releases.html" ''
<!doctype html>
<html>
<head>
@@ -143,4 +145,5 @@ in
''))}
</body>
</html>
-''
+'';
+}