summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Raymond <robin@robinraymond.de>2019-12-18 09:33:52 +0100
committerRobin Raymond <robin@robinraymond.de>2019-12-18 09:33:52 +0100
commit7bda4c4f110da5134ef9de5efe5d7e6f66bab6e6 (patch)
tree7d8c3a81c7b7a8f47c7acda193225f3b0b8e1957
parent5d1f5cb3494359805a392575eb733774d2e0eb06 (diff)
automatically update readme hash
-rw-r--r--README.md2
-rwxr-xr-xupdate.sh4
2 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index e75ccac..a6607ed 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,7 @@ See the [mailing list archive](https://www.freelists.org/archive/snm/)
imports = [
(builtins.fetchTarball {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.3.0/nixos-mailserver-v2.3.0.tar.gz";
- sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx";
+ sha256 = "0lpz08qviccvpfws2nm83n7m2r8add2wvfg9bljx9yxx8107r919";
})
];
diff --git a/update.sh b/update.sh
index ff38a9c..39d6402 100755
--- a/update.sh
+++ b/update.sh
@@ -1,3 +1,7 @@
#!/usr/bin/env bash
sed -i -e "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/$1/g" README.md
+
+HASH=$(nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.3.0/nixos-mailserver-$1.tar.gz" --unpack)
+
+sed -i -e "s/sha256 = \"[0-9a-z]\{52\}\"/sha256 = \"$HASH\"/g" README.md