From fa27621921869f91d0b749c3d77e5a89b214e365 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Sat, 13 Aug 2022 18:04:00 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20ability=20for=20custom=20ve?= =?UTF-8?q?rsion=20revanced?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 4 ++++ main.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index 6c43ee3..9c5efd9 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -29,6 +29,10 @@ jobs: - name: Check out Git repository uses: actions/checkout@v3 + - name: Update Env for custom build + run: | + echo ${{ secrets.ENVS }} >> .env + - name: Build APK run: | docker-compose up diff --git a/main.py b/main.py index 686f11a..9ce1f39 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import os import subprocess import sys from atexit import register @@ -288,6 +289,9 @@ def main() -> None: arg_parser = ArgParser logger.debug("Trying to build %s" % app) app_patches, version = patches.get(app=app) + if os.getenv(f"{app}_VERSION".upper()): + print("here") + version = os.getenv(f"{app}_VERSION".upper()) if app == "reddit" or app == "twitter": downloader.apkmirror_reddit_twitter(app, version) else: