2022-01-13 20:06:32 +00:00
|
|
|
#!/usr/bin/env nix-shell
|
2023-11-16 04:20:00 +00:00
|
|
|
#! nix-shell -I nixpkgs=../../../../.. -i bash -p curl gnused jq common-updater-scripts prefetch-npm-deps
|
2023-01-11 07:51:40 +00:00
|
|
|
set -eou pipefail
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cd "$(dirname "$0")"/../../../../..
|
2022-01-13 20:06:32 +00:00
|
|
|
version=$(nix-instantiate --strict --eval -A ArchiSteamFarm.version | jq -r)
|
2023-11-16 04:20:00 +00:00
|
|
|
cd -
|
2022-06-16 17:23:12 +00:00
|
|
|
ui=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/JustArchiNET/ArchiSteamFarm/contents/ASF-ui?ref=$version" | jq -r .sha)
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package-lock.json" -o package-lock.json
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cd -
|
|
|
|
update-source-version ArchiSteamFarm.ui "$ui"
|
|
|
|
cd -
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
npmDepsHash=$(prefetch-npm-deps ./package-lock.json)
|
|
|
|
sed -E 's#\bnpmDepsHash = ".*?"#npmDepsHash = "'"$npmDepsHash"'"#' -i default.nix
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
rm package-lock.json
|