From 5987f095ef0ce9f6860569e31e768a29cc757fe1 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 9 Oct 2023 18:43:52 +0200 Subject: [PATCH] furnace: Change updateScript Because gitUpdater sorts v0.6pre18 > v0.6, which produces downgrading automatic update PRs. --- pkgs/applications/audio/furnace/default.nix | 5 +---- pkgs/applications/audio/furnace/update.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100755 pkgs/applications/audio/furnace/update.sh diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix index 71cc796a621d..82166dd123b2 100644 --- a/pkgs/applications/audio/furnace/default.nix +++ b/pkgs/applications/audio/furnace/default.nix @@ -1,6 +1,5 @@ { stdenv , lib -, gitUpdater , testers , furnace , fetchFromGitHub @@ -104,9 +103,7 @@ stdenv.mkDerivation rec { ''; passthru = { - updateScript = gitUpdater { - rev-prefix = "v"; - }; + updateScript = ./update.sh; tests.version = testers.testVersion { package = furnace; }; diff --git a/pkgs/applications/audio/furnace/update.sh b/pkgs/applications/audio/furnace/update.sh new file mode 100755 index 000000000000..cc2969f35045 --- /dev/null +++ b/pkgs/applications/audio/furnace/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p common-updater-scripts curl jql + +set -eu -o pipefail + +# Because upstream uses release tags that don't always sort correctly, query for latest release +version="$( + curl -Ls 'https://api.github.com/repos/tildearrow/furnace/releases/latest' \ + | jql -r '"tag_name"' \ + | sed 's/^v//' +)" +update-source-version furnace "$version"