aboutsummaryrefslogtreecommitdiff
path: root/nix/build_index.nix
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-01-31 11:59:14 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-02-05 22:09:43 +0100
commitecd76977eab6232d9fbaa6acade87ec077416854 (patch)
tree33af6948ee7bb5fd10bdea6d8a6774da8a999133 /nix/build_index.nix
parent935670690f07fe1821052654e249cd7d69ce4e4b (diff)
downloadgarage-ecd76977eab6232d9fbaa6acade87ec077416854.tar.gz
garage-ecd76977eab6232d9fbaa6acade87ec077416854.zip
Generate JSON build description
Diffstat (limited to 'nix/build_index.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>
-''
+'';
+}