domination: add updateScript

(cherry picked from commit a3050a7481)
This commit is contained in:
Francesco Gazzetta
2025-01-28 22:18:51 +01:00
parent ac9e66924f
commit 8aa8577d59
2 changed files with 10 additions and 0 deletions

View File

@@ -96,6 +96,8 @@ stdenv.mkDerivation {
domination-starts = nixosTests.domination;
};
passthru.updateScript = ./update.tcl;
meta = with lib; {
homepage = "https://domination.sourceforge.net/";
downloadPage = "https://domination.sourceforge.net/download.shtml";

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i tclsh -p tcl common-updater-scripts curl
set changelog_url https://sourceforge.net/p/domination/code/HEAD/tree/Domination/ChangeLog.txt?format=raw
set changelog [exec -ignorestderr curl -Ls $changelog_url]
regexp {(\d+(\.\d+)*) \(\d+\.\d+\.\d+\) \(svn rev (\d+)\)} $changelog _ version _ rev
exec -ignorestderr update-source-version domination $version --rev=$rev