@@ -39,16 +39,27 @@ pr() { echo -e "\033[0;32m[+] ${1}\033[0m"; }
39
39
40
40
get_prebuilts () {
41
41
pr " Getting prebuilts"
42
- local rv_cli_url rv_integrations_url rv_patches rv_patches_changelog rv_patches_dl rv_patches_url
42
+ local rv_cli_url rv_integrations_url rv_patches rv_patches_changelog rv_patches_dl rv_patches_url rv_integrations_rel rv_patches_rel
43
43
rv_cli_url=$( gh_req " https://api.github.com/repos/j-hc/revanced-cli/releases/latest" - | json_get ' browser_download_url' ) || return 1
44
44
RV_CLI_JAR=" ${PREBUILTS_DIR} /${rv_cli_url##*/ } "
45
45
log " CLI: ${rv_cli_url##*/ } "
46
46
47
- rv_integrations_url=$( gh_req " https://api.github.com/repos/${INTEGRATIONS_SRC} /releases/latest" - | json_get ' browser_download_url' )
47
+ if [ " $CONF_INTEGRATIONS_VER " ]; then
48
+ rv_integrations_rel=" https://api.github.com/repos/${INTEGRATIONS_SRC} /releases/tags/${CONF_INTEGRATIONS_VER} "
49
+ else
50
+ rv_integrations_rel=" https://api.github.com/repos/${INTEGRATIONS_SRC} /releases/latest"
51
+ fi
52
+ if [ " $CONF_PATCHES_VER " ]; then
53
+ rv_patches_rel=" https://api.github.com/repos/${PATCHES_SRC} /releases/tags/${CONF_PATCHES_VER} "
54
+ else
55
+ rv_patches_rel=" https://api.github.com/repos/${PATCHES_SRC} /releases/latest"
56
+ fi
57
+
58
+ rv_integrations_url=$( gh_req " $rv_integrations_rel " - | json_get ' browser_download_url' )
48
59
RV_INTEGRATIONS_APK=" ${PREBUILTS_DIR} /${rv_integrations_url##*/ } "
49
60
log " Integrations: ${rv_integrations_url##*/ } "
50
61
51
- rv_patches=$( gh_req " https://api.github.com/repos/ ${PATCHES_SRC} /releases/latest " -)
62
+ rv_patches=$( gh_req " $rv_patches_rel " -)
52
63
rv_patches_changelog=$( echo " $rv_patches " | json_get ' body' | sed ' s/\(\\n\)\+/\\n/g' )
53
64
rv_patches_dl=$( json_get ' browser_download_url' <<< " $rv_patches" )
54
65
RV_PATCHES_JSON=" ${PREBUILTS_DIR} /patches-$( json_get ' tag_name' <<< " $rv_patches" ) .json"
@@ -160,6 +171,7 @@ get_apkmirror_vers() {
160
171
if [ " $allow_alpha_version " = false ]; then
161
172
local IFS=$' \n '
162
173
vers=$( grep -iv " \(beta\|alpha\)" <<< " $vers" )
174
+ local v
163
175
local r_vers=()
164
176
for v in $vers ; do
165
177
grep -iq " ${v} \(beta\|alpha\)" <<< " $apkm_resp" || r_vers+=(" $v " )
0 commit comments