mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-21 23:51:00 +00:00
Generate and upload a JSON result
This commit is contained in:
parent
241db1e1f5
commit
6f7ef11537
2 changed files with 15 additions and 7 deletions
|
@ -88,10 +88,8 @@ let
|
||||||
builds = builtins.sort cmpDate (map (x: { version = x; builds = builtins.getAttr x builds_per_version; }) versions_commit);
|
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" ''
|
html = pkgs.writeTextDir "share/_releases.html" ''
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -146,4 +144,8 @@ in
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
'';
|
'';
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "releases";
|
||||||
|
paths = [ json html ];
|
||||||
}
|
}
|
||||||
|
|
12
shell.nix
12
shell.nix
|
@ -51,9 +51,15 @@ function refresh_index {
|
||||||
--endpoint-url https://garage.deuxfleurs.fr \
|
--endpoint-url https://garage.deuxfleurs.fr \
|
||||||
--region garage \
|
--region garage \
|
||||||
s3 cp \
|
s3 cp \
|
||||||
--content-type "text/html" \
|
result/share/_releases.json \
|
||||||
result \
|
s3://garagehq.deuxfleurs.fr/
|
||||||
s3://garagehq.deuxfleurs.fr/_releases.html
|
|
||||||
|
aws \
|
||||||
|
--endpoint-url https://garage.deuxfleurs.fr \
|
||||||
|
--region garage \
|
||||||
|
s3 cp \
|
||||||
|
result/share/_releases.html \
|
||||||
|
s3://garagehq.deuxfleurs.fr/
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh_toolchain {
|
function refresh_toolchain {
|
||||||
|
|
Loading…
Reference in a new issue