radicle-httpd: use canonical release tag
This commit is contained in:
@@ -23,8 +23,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
src = fetchFromRadicle {
|
||||
seed = "seed.radicle.xyz";
|
||||
repo = "z4V1sjrXqjvFdnCUbxPFqd5p4DtH5";
|
||||
node = "z6MkwPUeUS2fJMfc2HZN1RQTQcTTuhw4HhPySB8JeUg2mVvx";
|
||||
tag = "v${finalAttrs.version}";
|
||||
tag = "releases/${finalAttrs.version}";
|
||||
sparseCheckout = [ "radicle-httpd" ];
|
||||
hash = "sha256-NA5U+Ac6imbtNabvaeYATfUbbmT48uqWAcbJ+ukJcDs=";
|
||||
};
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
#!/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-httpd.src.url)
|
||||
old_node=$(nix-instantiate --eval --raw -A radicle-httpd.src.node)
|
||||
|
||||
ref=$(git ls-remote "$url" 'refs/namespaces/*/refs/tags/v0*' \
|
||||
| cut -f2 | grep -Ev '\^\{\}$' | sort -t/ -k6rV | head -1)
|
||||
[[ "$ref" =~ ^refs/namespaces/([^/]+)/refs/tags/v([^/]+)$ ]]
|
||||
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-httpd
|
||||
nix-update --version=skip radicle-explorer
|
||||
|
||||
Reference in New Issue
Block a user