From f419e0e36fdd21281a08912c82821ff7ac1cc67e Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Sat, 5 Aug 2023 17:41:08 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Per=20app=20key=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- src/app.py | 3 +++ src/config.py | 4 +++- src/parser.py | 3 +-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6b86464..b6bf901 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,7 @@ By default, script build the version as recommended by Revanced team. YOUTUBE_MUSIC_INTEGRATION_DL=https://github.com/inotia00/revanced-integrations/releases/latest YOUTUBE_MUSIC_PATCHES_DL=https://github.com/inotia00/revanced-patches/releases/latest YOUTUBE_MUSIC_CLI_DL=https://github.com/inotia00/revanced-cli/releases/latest + YOUTUBE_MUSIC_KEYSTORE_FILE_NAME=key.store ``` These link if not from GitHub must be direct download links. 7. You can also provide a default resources which will be used when per app config is missing. @@ -260,7 +261,7 @@ By default, script build the version as recommended by Revanced team. inside `apks` folder. And adding the name of `keystore-file` in `.env` file or in `ENVS` in `GitHub secrets` (Recommended) in the format ```dotenv - KEYSTORE_FILE_NAME=revanced.keystore + GLOBAL_KEYSTORE_FILE_NAME=revanced.keystore ``` 11. For Telegram Upload. 1. Set up a telegram channel, send a message to it and forward the message to diff --git a/src/app.py b/src/app.py index 00337cb..5a1ac5f 100644 --- a/src/app.py +++ b/src/app.py @@ -29,6 +29,9 @@ class APP(object): self.include_request = config.env.list(f"INCLUDE_PATCH_{app_name}".upper(), []) self.resource: Dict[str, str] = {} self.no_of_patches = 0 + self.keystore_name = config.env.str( + f"{app_name}_KEYSTORE_FILE_NAME".upper(), config.global_keystore_name + ) self.download_patch_resources(config) def get_output_file_name(self) -> str: diff --git a/src/config.py b/src/config.py index 39f657b..acd272a 100644 --- a/src/config.py +++ b/src/config.py @@ -35,7 +35,9 @@ class RevancedConfig(object): ] self.apk_pure = ["hex-editor", "androidtwelvewidgets"] self.apk_sos = ["expensemanager", "candyvpn"] - self.keystore_name = env.str("KEYSTORE_FILE_NAME", "revanced.keystore") + self.global_keystore_name = env.str( + "GLOBAL_KEYSTORE_FILE_NAME", "revanced.keystore" + ) self.ci_test = env.bool("CI_TEST", False) self.apps = env.list("PATCH_APPS", default_build) self.rip_libs_apps: List[str] = [] diff --git a/src/parser.py b/src/parser.py index 8180847..2a62080 100644 --- a/src/parser.py +++ b/src/parser.py @@ -89,7 +89,7 @@ class Parser(object): "-o", app.get_output_file_name(), "--keystore", - self.config.keystore_name, + app.keystore_name, "--options", "options.json", ] @@ -111,7 +111,6 @@ class Parser(object): logger.debug( f"Sending request to revanced cli for building with args java {args}" ) - return process = Popen(["java", *args], stdout=PIPE) output = process.stdout if not output: