ArchiSteamFarm: update programm and web-ui in one run

This commit is contained in:
Sandro Jäckel 2022-06-06 02:12:53 +02:00
parent 1841ad02a3
commit 89d5ef1295
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 8 additions and 3 deletions

View File

@ -15,6 +15,7 @@ if [[ "$new_version" == "$old_version" ]]; then
fi
fi
asf_path=$(pwd)
cd ../../../..
nixpkgs_path=$(pwd)
@ -47,3 +48,5 @@ trap '
popd
rm -r "$src"
' EXIT
cd "$asf_path"
./web-ui/update.sh

View File

@ -1,11 +1,13 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix gnused jq curl
#! nix-shell -I nixpkgs=../../../.. -i bash -p nodePackages.node2nix gnused jq curl
set -eoux pipefail
pushd ../../../..
version=$(nix-instantiate --strict --eval -A ArchiSteamFarm.version | jq -r)
popd
pushd "$(dirname "$0")"
ui=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/JustArchiNET/ArchiSteamFarm/contents/ASF-ui?ref=$version" | jq -r .sha)
pushd $(dirname "$0")
curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package-lock.json" -o package-lock.json
curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package.json" -o package.json