marksman: switch to nix-update-script

This commit is contained in:
Michal Trybus
2025-12-09 22:43:26 +01:00
parent 66231cfa7d
commit a0a6530006
2 changed files with 2 additions and 19 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
nix-update-script,
versionCheckHook,
}:
@@ -38,7 +39,7 @@ buildDotnetModule (finalAttrs: {
'';
passthru = {
updateScript = ./update.sh;
updateScript = nix-update-script { };
};
nativeInstallCheckInputs = [ versionCheckHook ];
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
#shellcheck shell=bash
set -eu -o pipefail
version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
https://api.github.com/repos/artempyanykh/marksman/releases/latest | jq -e -r .tag_name)
old_version=$(nix-instantiate --eval -A marksman.version | jq -e -r)
if [[ $version == "$old_version" ]]; then
echo "New version same as old version, nothing to do." >&2
exit 0
fi
update-source-version marksman "$version"
$(nix-build -A marksman.fetch-deps --no-out-link)