ArchiSteamFarm: 5.4.11.4 -> 5.4.12.3, fix update script for web-ui

This commit is contained in:
Sandro Jäckel 2023-10-20 16:33:36 +02:00 committed by Yaya
parent b11e3eb7d1
commit c781bd7a53
6 changed files with 23 additions and 21 deletions

View File

@ -11,13 +11,13 @@
buildDotnetModule rec {
pname = "ArchiSteamFarm";
# nixpkgs-update: no auto update
version = "5.4.11.4";
version = "5.4.12.5";
src = fetchFromGitHub {
owner = "JustArchiNET";
repo = "ArchiSteamFarm";
rev = version;
hash = "sha256-wgCpUuJ7Xd+M+YLvywSW/sCQG3SfQtHBX1XJTJVVoI8=";
hash = "sha256-iIYA9BnHUfsB4J7VbSLKaRdJHMW/xULJxKfv8atfAd8=";
};
dotnet-runtime = dotnetCorePackages.aspnetcore_7_0;

View File

@ -71,6 +71,10 @@
(fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "6.0.0"; sha256 = "0b75fmins171zi6bfdcq1kcvyrirs8n91mknjnxy4c3ygi1rrnj0"; })
(fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "6.0.0"; sha256 = "008pnk2p50i594ahz308v81a41mbjz9mwcarqhmrjpl2d20c868g"; })
(fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "6.0.0"; sha256 = "1kjiw6s4yfz9gm7mx3wkhp06ghnbs95icj9hi505shz9rjrg42q2"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Abstractions"; version = "7.0.3"; sha256 = "0njmg2lygnirnfjv9gck2f5lq4ly5rgws9cpf8qj3kwcwxfp0b9s"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.JsonWebTokens"; version = "7.0.3"; sha256 = "1ayh85xqdq8rqjk2iqcn7iaczcl7d8qg6bxk0b4rgx59fmsmbqj7"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Logging"; version = "7.0.3"; sha256 = "13cjqmf59k895q6gkd5ycl89mnpalckda7rhsdl11jdyr32hsfnv"; })
(fetchNuGet { pname = "Microsoft.IdentityModel.Tokens"; version = "7.0.3"; sha256 = "1pmhd0imh9wlhvbvvwjrpjsqvzagi2ly22nddwr4r0pi234khyz1"; })
(fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "17.7.2"; sha256 = "08g9dpp766racnh90s1sy3ncl291majgq6v2604hfw1f6zkmbjqh"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "5.0.0"; sha256 = "0mwpwdflidzgzfx2dlpkvvnkgkr2ayaf0s80737h4wa35gaj11rc"; })
(fetchNuGet { pname = "Microsoft.OpenApi"; version = "1.2.3"; sha256 = "07b19k89whj69j87afkz86gp9b3iybw8jqwvlgcn43m7fb2y99rr"; })
@ -108,6 +112,7 @@
(fetchNuGet { pname = "System.Composition.Runtime"; version = "7.0.0"; sha256 = "1p9xpqzx42s8cdizv6nh15hcjvl2km0rwby66nfkj4cb472l339s"; })
(fetchNuGet { pname = "System.Composition.TypedParts"; version = "7.0.0"; sha256 = "0syz7y6wgnxxgjvfqgymn9mnaa5fjy1qp06qnsvh3agr9mvcv779"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "6.0.0"; sha256 = "0rrihs9lnb1h6x4h0hn6kgfnh58qq7hx8qq99gh6fayx4dcnx3s5"; })
(fetchNuGet { pname = "System.IdentityModel.Tokens.Jwt"; version = "7.0.3"; sha256 = "1fls88ffq34j1gr6zay1crm27v3sjs5fa4mvj9akqjq05bxanlhk"; })
(fetchNuGet { pname = "System.Linq.Async"; version = "6.0.1"; sha256 = "10ira8hmv0i54yp9ggrrdm1c06j538sijfjpn1kmnh9j2xk5yzmq"; })
(fetchNuGet { pname = "System.Reflection.Metadata"; version = "1.6.0"; sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "6.0.0"; sha256 = "0qm741kh4rh57wky16sq4m0v05fxmkjjr87krycf5vp9f0zbahbc"; })

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq common-updater-scripts nix-prefetch prefetch-npm-deps
#!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq common-updater-scripts
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
@ -14,7 +14,7 @@ if [[ "$new_version" == "$old_version" ]]; then
fi
asf_path=$PWD
pushd ../../../..
cd ../../../..
if [[ "${1:-}" != "--deps-only" ]]; then
update-source-version ArchiSteamFarm "$new_version"
@ -22,5 +22,5 @@ fi
$(nix-build -A ArchiSteamFarm.fetch-deps --no-out-link)
popd
"$asf_path/web-ui/update.sh"
cd "$asf_path/web-ui"
./update.sh

View File

@ -0,0 +1 @@
package-lock.json

View File

@ -1,19 +1,19 @@
{ lib, fetchFromGitHub, buildNpmPackage, ArchiSteamFarm }:
buildNpmPackage {
buildNpmPackage rec {
pname = "asf-ui";
inherit (ArchiSteamFarm) version;
version = "fceb2fb828cfa420c77dc5cde433fd519a6717d4";
src = fetchFromGitHub {
owner = "JustArchiNET";
repo = "ASF-ui";
# updated by the update script
# this is always the commit that should be used with asf-ui from the latest asf version
rev = "1d748b6ea01cc2ed7eebb32b4e8f990d8ff5c7d7";
hash = "sha256-fb6fiZOnQeYzasL/NqCtTQTNOhdmIMG0mymaQ9zKQko=";
rev = version;
hash = "sha256-gMQWly7HN5rIV9r72Qa+gHuBuQMs9sh09od4ja4sRGU=";
};
npmDepsHash = "sha256-xbGSmorPytbsjmcGOnGOYXWryMIwCPJ/ksMkSgSfJWY=";
npmDepsHash = "sha256-UDCQTRpcPDcuvPzlqTu315EkGr5G0+z7qMSsPgYQacA=";
installPhase = ''
runHook preInstall

View File

@ -1,23 +1,19 @@
#!/usr/bin/env nix-shell
#! nix-shell -I nixpkgs=../../../.. -i bash -p nodePackages.node2nix gnused jq curl
#! nix-shell -I nixpkgs=../../../../.. -i bash -p curl gnused jq common-updater-scripts prefetch-npm-deps
set -eou pipefail
cd "$(dirname "$0")"
pushd ../../../../..
cd "$(dirname "$0")"/../../../../..
version=$(nix-instantiate --strict --eval -A ArchiSteamFarm.version | jq -r)
popd
pushd "$(dirname "$0")"
cd -
ui=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/JustArchiNET/ArchiSteamFarm/contents/ASF-ui?ref=$version" | jq -r .sha)
curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package-lock.json" -o package-lock.json
# update-source-version doesn't work for some reason
sed -i "s/rev\\s*=\\s*.*/rev = \"$ui\";/" default.nix
sed -i "s/hash\\s*=\\s*.*/hash = \"$(nix-prefetch fetchurl --url "https://github.com/JustArchiNET/ASF-ui/archive/$ui.tar.gz")\";/" default.nix
cd -
update-source-version ArchiSteamFarm.ui "$ui"
cd -
npmDepsHash=$(prefetch-npm-deps ./package-lock.json)
sed -E 's#\bnpmDepsHash = ".*?"#npmDepsHash = "'"$npmDepsHash"'"#' -i default.nix
rm package-lock.json
popd