diff --git a/.env.my b/.env.my
index 10977ec..0a7598e 100644
--- a/.env.my
+++ b/.env.my
@@ -1,22 +1,25 @@
#Global:
-EXTRA_FILES=https://github.com/ReVanced/GmsCore/releases/latest@Revanced-Microg.apk,https://github.com/WSTxda/MicroG-RE/releases/latest@WSTxda-MicroGRE.apk
+EXTRA_FILES=https://github.com/ReVanced/GmsCore/releases/latest@Revanced-Microg.apk
PATCH_APPS=youtube,youtube_music,reddit,twitter
+GLOBAL_CLI_DL=https://github.com/revanced/revanced-cli/releases/latest-prerelease
+GLOBAL_PATCHES_DL=https://github.com/revanced/revanced-patches/releases/latest-prerelease
+GLOBAL_INTEGRATIONS_DL=https://github.com/revanced/revanced-integrations/releases/latest-prerelease
#YouTube:
-YOUTUBE_PATCHES_DL=https://github.com/anddea/revanced-patches
-YOUTUBE_INTEGRATIONS_DL=https://github.com/anddea/revanced-integrations
+YOUTUBE_PATCHES_DL=https://github.com/anddea/revanced-patches/releases/latest-prerelease
+YOUTUBE_INTEGRATIONS_DL=https://github.com/anddea/revanced-integrations/releases/latest-prerelease
YOUTUBE_EXCLUDE_PATCH=custom-branding-icon-youtube,custom-branding-name-youtube,enable-debug-logging,hide-fullscreen-button
#YouTube Music:
-YOUTUBE_MUSIC_PATCHES_DL=https://github.com/anddea/revanced-patches
-YOUTUBE_MUSIC_INTEGRATIONS_DL=https://github.com/anddea/revanced-integrations
+YOUTUBE_MUSIC_PATCHES_DL=https://github.com/anddea/revanced-patches/releases/latest-prerelease
+YOUTUBE_MUSIC_INTEGRATIONS_DL=https://github.com/anddea/revanced-integrations/releases/latest-prerelease
YOUTUBE_MUSIC_EXCLUDE_PATCH=custom-branding-icon-youtube-music,custom-branding-name-youtube-music,enable-compact-dialog,enable-debug-logging
#Reddit:
-REDDIT_PATCHES_DL=https://github.com/anddea/revanced-patches
-REDDIT_INTEGRATIONS_DL=https://github.com/anddea/revanced-integrations
+REDDIT_PATCHES_DL=https://github.com/anddea/revanced-patches/releases/latest-prerelease
+REDDIT_INTEGRATIONS_DL=https://github.com/anddea/revanced-integrations/releases/latest-prerelease
REDDIT_EXCLUDE_PATCH=change-package-name
#Twitter:
-TWITTER_PATCHES_DL=https://github.com/crimera/piko
-TWITTER_INTEGRATIONS_DL=https://github.com/crimera/revanced-integrations
+TWITTER_PATCHES_DL=https://github.com/crimera/piko/releases/latest-prerelease
+TWITTER_INTEGRATIONS_DL=https://github.com/crimera/revanced-integrations/releases/latest-prerelease
diff --git a/README.md b/README.md
index 5f077e4..6a08ea5 100644
--- a/README.md
+++ b/README.md
@@ -296,9 +296,21 @@ You can use any of the following methods to build.
With the config tool will try to patch YouTube with resources from inotia00 while other global resource will used
for patching other apps.
If you have want to provide resource locally in the apks folder. You can specify that by mentioning filename
- prefixed with `local://`.
- *Note* - The link provided must be DLs. Unless they are from GitHub.
- *Note* - Some of the patch source like inotia00 still provides **-** seperated patches while revanced shifted to
+ prefixed with `local://`.
+ *Note* - The link provided must be DLs. Unless they are from GitHub.
+ *Note* - If your patches resource are available on GitHub and you want to select latest resource without excluding
+ pre-release you can add `latest-prerelease` to the URL.
+ Example:
+ ```dotenv
+ YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches/releases/latest-prerelease
+ ```
+ For above example tool while selecting latest patches will consider pre-releases/beta too.
+ ```dotenv
+ YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches/releases/latest
+ ```
+ For above example tool while selecting latest patches will exclude any pre-release/beta ie. will consider only
+ stable releases..
+ *Note* - Some of the patch source like inotia00 still provides **-** separated patches while revanced shifted to
Space formatted patches. Use `SPACE_FORMATTED_PATCHES` to define the type of patches.
8. If you don't want to use default keystore. You can provide your own by
diff --git a/src/downloader/github.py b/src/downloader/github.py
index b257643..3106860 100644
--- a/src/downloader/github.py
+++ b/src/downloader/github.py
@@ -5,6 +5,7 @@ from typing import Self
from urllib.parse import urlparse
import requests
+from lastversion import latest
from loguru import logger
from src.app import APP
@@ -53,11 +54,16 @@ class Github(Downloader):
github_repo_owner = path_segments[0]
github_repo_name = path_segments[1]
-
- release_tag = next(
- (f"tags/{path_segments[i + 1]}" for i, segment in enumerate(path_segments) if segment == "tag"),
- "latest",
- )
+ tag_position = 3
+ if len(path_segments) > tag_position and path_segments[3] == "latest-prerelease":
+ logger.info(f"Including pre-releases/beta for {github_repo_name} selection.")
+ latest_tag = str(latest(f"{github_repo_owner}/{github_repo_name}", output_format="tag", pre_ok=True))
+ release_tag = f"tags/{latest_tag}"
+ else:
+ release_tag = next(
+ (f"tags/{path_segments[i + 1]}" for i, segment in enumerate(path_segments) if segment == "tag"),
+ "latest",
+ )
return github_repo_owner, github_repo_name, release_tag
@staticmethod