radicle-tui: use canonical release tag (#495742)

This commit is contained in:
Felix Bargfeldt
2026-03-02 15:17:54 +00:00
committed by GitHub
2 changed files with 2 additions and 16 deletions
-1
View File
@@ -17,7 +17,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
src = fetchFromRadicle {
seed = "seed.radicle.xyz";
repo = "z39mP9rQAaGmERfUMPULfPUi473tY";
node = "z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz";
tag = "releases/${finalAttrs.version}";
hash = "sha256-2/pLlhilJyrZl9eLFWIh4YxlJwBbzjmb1Cg1xFSSl5k=";
leaveDotGit = true;
+2 -15
View File
@@ -1,18 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils gnused gitMinimal nix-update
#!nix-shell -i bash -p coreutils gnugrep common-updater-scripts nix-update
set -euo pipefail
dirname="$(dirname "${BASH_SOURCE[0]}")"
url=$(nix-instantiate --eval --raw -A radicle-tui.src.url)
old_node=$(nix-instantiate --eval --raw -A radicle-tui.src.node)
ref=$(git ls-remote "$url" 'refs/namespaces/*/refs/tags/releases/*' \
| cut -f2 | grep -Ev '\^\{\}$' | sort -t/ -k6rV | head -1)
[[ "$ref" =~ ^refs/namespaces/([^/]+)/refs/tags/releases/([^/]+)$ ]]
new_node="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
sed -i "s/${old_node}/${new_node}/g" "${dirname}/package.nix"
version=$(list-git-tags | grep -oP '^releases/\K\d+\.\d+\.\d+$' | sort -rV | head -1)
nix-update --version="$version" radicle-tui