From a28db76a6b1c7da121eb55062e9ce051f53c4afb Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Fri, 9 Feb 2024 15:07:50 +0300 Subject: [PATCH] Utility folder --- .github/workflows/retrieve_version.sh | 2 +- .github/workflows/update_packages.sh | 2 +- README.md | 2 +- build_deb.sh | 8 ++++---- nix/default.nix | 2 +- nix/generate_packages.nix | 2 +- generate_packages.sh => utility/generate_packages.sh | 4 ++-- version_info.json => utility/version_info.json | 0 8 files changed, 11 insertions(+), 11 deletions(-) rename generate_packages.sh => utility/generate_packages.sh (95%) rename version_info.json => utility/version_info.json (100%) diff --git a/.github/workflows/retrieve_version.sh b/.github/workflows/retrieve_version.sh index c765f43..99dc854 100644 --- a/.github/workflows/retrieve_version.sh +++ b/.github/workflows/retrieve_version.sh @@ -3,7 +3,7 @@ set -e # get version -VERSION=$(jq -r '.version' version_info.json) +VERSION=$(jq -r '.version' ./utility/version_info.json) release_name="Beta $VERSION" tag_name="v$VERSION" diff --git a/.github/workflows/update_packages.sh b/.github/workflows/update_packages.sh index fa5c6b6..5234544 100644 --- a/.github/workflows/update_packages.sh +++ b/.github/workflows/update_packages.sh @@ -16,7 +16,7 @@ case $OS in "Arch Linux") echo "Arch Linux" pacman -S --noconfirm git sudo base-devel jq nix - sh ./generate_packages.sh + sh ./utility/generate_packages.sh git config --global --add safe.directory "*" ;; *) diff --git a/README.md b/README.md index f2590d3..2a2925c 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ In addition you will need to install [Asar](https://github.com/electron/asar) to npm install -g @electron/asar ``` -Last step is to download original client `.exe` file. You can get it yourself or take link to the latest version from `version_info.json` file. +Last step is to download original client `.exe` file. You can get it yourself or take link to the latest version from `./utility/version_info.json` file. *** diff --git a/build_deb.sh b/build_deb.sh index b0b4147..f0d8084 100755 --- a/build_deb.sh +++ b/build_deb.sh @@ -60,10 +60,10 @@ TEMPDIR="$(mktemp -d)" trap clear EXIT #loading version info with jq -version=$(jq -r '.version' version_info.json) -exe_name=$(jq -r '.exe_name' version_info.json) -exe_link=$(jq -r '.exe_link' version_info.json) -exe_sha256=$(jq -r '.exe_sha256' version_info.json) +version=$(jq -r '.version' ./utility/version_info.json) +exe_name=$(jq -r '.exe_name' ./utility/version_info.json) +exe_link=$(jq -r '.exe_link' ./utility/version_info.json) +exe_sha256=$(jq -r '.exe_sha256' ./utility/version_info.json) #downloading exe echo "Downloading $exe_name" diff --git a/nix/default.nix b/nix/default.nix index 8ca6fc0..51a0f3f 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -12,7 +12,7 @@ , fixQuit ? true }: let - version_info = with builtins; fromJSON (readFile ../version_info.json); + version_info = with builtins; fromJSON (readFile ../utility/version_info.json); in stdenvNoCC.mkDerivation { diff --git a/nix/generate_packages.nix b/nix/generate_packages.nix index 81f5f82..da65df2 100644 --- a/nix/generate_packages.nix +++ b/nix/generate_packages.nix @@ -9,7 +9,7 @@ let in runCommand "generate_config" { - src = ../generate_packages.sh; + src = ../utility/generate_packages.sh; name = "generate_packages"; nativeBuildInputs = [ makeWrapper diff --git a/generate_packages.sh b/utility/generate_packages.sh similarity index 95% rename from generate_packages.sh rename to utility/generate_packages.sh index 08febb1..a92e0b5 100644 --- a/generate_packages.sh +++ b/utility/generate_packages.sh @@ -47,9 +47,9 @@ load_current_version() { } update_version() { - rm -rf ./version_info.json + rm -rf ./utility/version_info.json - cat > ./version_info.json < ./utility/version_info.json <