mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
renode: fix update script
Signed-off-by: Samuel Silva <samuel@ossystems.com.br>
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
gtk3,
|
||||
lib,
|
||||
mono,
|
||||
nix-update-script,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
@@ -180,7 +179,7 @@ buildDotnetModule rec {
|
||||
|
||||
executables = [ "Renode" ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/renode/renode/blob/${version}/CHANGELOG.rst";
|
||||
|
||||
19
pkgs/by-name/re/renode/update.sh
Executable file
19
pkgs/by-name/re/renode/update.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts git nix
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
latest_tag=$(curl -s https://api.github.com/repos/renode/renode/releases/latest | jq -r '.tag_name')
|
||||
latest_version="${latest_tag#v}"
|
||||
|
||||
# Resolve tag to commit hash
|
||||
# Try dereferenced ref first (annotated tags), then direct ref (lightweight tags)
|
||||
commit=$(git ls-remote https://github.com/renode/renode "refs/tags/${latest_tag}^{}" | awk '{print $1}')
|
||||
if [[ -z "$commit" ]]; then
|
||||
commit=$(git ls-remote https://github.com/renode/renode "refs/tags/${latest_tag}" | awk '{print $1}')
|
||||
fi
|
||||
|
||||
update-source-version renode "$latest_version" --rev="$commit"
|
||||
|
||||
# Regenerate nuget deps
|
||||
$(nix-build -A renode.passthru.fetch-deps --no-out-link)
|
||||
Reference in New Issue
Block a user