gomuks-web: add update script

This commit is contained in:
Martin Weinelt
2026-03-21 15:37:36 +01:00
parent baae144d3d
commit 9eab52167d
2 changed files with 21 additions and 3 deletions
+1 -3
View File
@@ -75,9 +75,7 @@ buildGoModule (finalAttrs: {
mv $out/bin/gomuks $out/bin/gomuks-web
'';
passthru.updateScript = {
inherit (finalAttrs) frontend;
};
passthru.updateScript = ./update.sh;
meta = {
mainProgram = "gomuks-web";
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq nix-update
set -euo pipefail
# Fetch latest release infor
RELEASE=$(curl -sSL https://api.github.com/repos/tulir/gomuks/releases/latest | jq -r .name)
if [ -z "$RELEASE" ]; then
echo "Failed to fetch latest release"
exit 1
fi
# Strip leading v from version
VERSION="${RELEASE#v}"
# Debug
echo "Release ${RELEASE} -> Version ${VERSION}"
nix-update --build --commit --version "${VERSION}" gomuks-web