aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nix/build_index.nix10
-rw-r--r--shell.nix12
2 files changed, 15 insertions, 7 deletions
diff --git a/nix/build_index.nix b/nix/build_index.nix
index a0313a9e..4625e3ae 100644
--- a/nix/build_index.nix
+++ b/nix/build_index.nix
@@ -88,10 +88,8 @@ let
builds = builtins.sort cmpDate (map (x: { version = x; builds = builtins.getAttr x builds_per_version; }) versions_commit);
}
];
-in
-{
- json = pkgs.writeTextDir "share/_releases.json" (builtins.toJSON sorted_builds);
+ json = pkgs.writeTextDir "share/_releases.json" (builtins.toJSON sorted_builds);
html = pkgs.writeTextDir "share/_releases.html" ''
<!doctype html>
<html>
@@ -146,4 +144,8 @@ in
</body>
</html>
'';
-}
+in
+ pkgs.symlinkJoin {
+ name = "releases";
+ paths = [ json html ];
+ }
diff --git a/shell.nix b/shell.nix
index 1d70730e..57e95e01 100644
--- a/shell.nix
+++ b/shell.nix
@@ -51,9 +51,15 @@ function refresh_index {
--endpoint-url https://garage.deuxfleurs.fr \
--region garage \
s3 cp \
- --content-type "text/html" \
- result \
- s3://garagehq.deuxfleurs.fr/_releases.html
+ result/share/_releases.json \
+ s3://garagehq.deuxfleurs.fr/
+
+ aws \
+ --endpoint-url https://garage.deuxfleurs.fr \
+ --region garage \
+ s3 cp \
+ result/share/_releases.html \
+ s3://garagehq.deuxfleurs.fr/
}
function refresh_toolchain {