Update 5etools
This commit is contained in:
parent
82c5f7237b
commit
64e6b4be7a
1
nixos/roles/5etools-url.nix
Normal file
1
nixos/roles/5etools-url.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ url = "https://github.com/5etools-mirror-1/5etools-mirror-1.github.io/releases/download/v1.150.1/5etools-v1.150.1.zip"; sha265 = "05m5s2swlgs4g21j28hxyniga8mdx0vll2wh8bxcgfaryibqw90l"; }
|
|
@ -55,11 +55,7 @@ in
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = {
|
locations = {
|
||||||
"/rules/" = {
|
"/rules/" = {
|
||||||
alias = "${pkgs.fetchzip {
|
alias = "${pkgs.fetchzip (import ./5etools-url.nix)}/";
|
||||||
url = "https://github.com/5etools-mirror-1/5etools-mirror-1.github.io/releases/download/v1.149.1/5etools-v1.149.1.zip";
|
|
||||||
sha256 = "sha256-vGGB0xaeQi4O4wIAFKtkRXCEPbB3TRo0OWhemBRCO5c=";
|
|
||||||
stripRoot = false;
|
|
||||||
}}/";
|
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
};
|
};
|
||||||
"/" = {
|
"/" = {
|
||||||
|
|
10
nixos/roles/update-5etools.sh
Executable file
10
nixos/roles/update-5etools.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
NEW_VERSION="$(gh release list -R 5etools-mirror-1/5etools-mirror-1.github.io -L 1 | sed 's/\(v[0-9\.]*\)\s*Latest.*/\1/')"
|
||||||
|
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
|
URL="https://github.com/5etools-mirror-1/5etools-mirror-1.github.io/releases/download/$NEW_VERSION/5etools-$NEW_VERSION.zip"
|
||||||
|
HASH="$(nix-prefetch-url --unpack "$URL")"
|
||||||
|
|
||||||
|
echo "{ url = \"$URL\"; sha256 = \"$HASH\";}" > "$SCRIPTPATH/5etools-url.nix"
|
Loading…
Reference in a new issue