Skip to content

Commit

Permalink
action: update cli
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulkhatri137 committed Aug 30, 2023
1 parent b415478 commit cbfbc84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ get_apkmirror_pkg_name() { req "$1" - | sed -n 's;.*id=\(.*\)" class="accent_col
# --------------------------------------------------

patch_apk() {
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5 rv_integ_apk=$6
declare -r tdir=$(mktemp -d -p $TEMP_DIR)
local cmd="java -jar $rv_cli_jar --rip-lib x86_64 --rip-lib x86 --temp-dir=$tdir -c -a $stock_input -o $patched_apk -b $rv_patches_jar --keystore=revanced.keystore $patcher_args"
local cmd="java -jar $rv_cli_jar patch -b $rv_patches_jar -m $rv_integ_apk -o $patched_apk -r $tdir -p --rip-lib x86_64 --rip-lib x86 --keystore=revanced.keystore $patcher_args $stock_input"
pr "$cmd"
if [ "${DRYRUN:-}" = true ]; then
cp -f "$stock_input" "$patched_apk"
Expand Down Expand Up @@ -267,7 +267,6 @@ build_rv() {
fi
log "${table}: ${version}"

if [ "${args[merge_integrations]}" = true ]; then p_patcher_args+=("-m ${args[integ]}"); fi
local microg_patch
microg_patch=$(jq -r ".[] | select(.compatiblePackages[].name==\"${pkg_name}\") | .name" "${args[ptjs]}" | grep -iF microg || :)
if [ "$microg_patch" ]; then
Expand All @@ -292,7 +291,7 @@ build_rv() {
patched_apk="${TEMP_DIR}/${app_name_l}-${rv_brand_f}-${version_f}-${arch_f}.apk"
fi
if [ ! -f "$patched_apk" ] || [ "$REBUILD" = true ]; then
if ! patch_apk "$stock_apk" "$patched_apk" "${patcher_args[*]}" "${args[cli]}" "${args[ptjar]}"; then
if ! patch_apk "$stock_apk" "$patched_apk" "${patcher_args[*]}" "${args[cli]}" "${args[ptjar]}" "${args[integ]}"; then
epr "Building '${table}' failed!"
return 0
fi
Expand Down
8 changes: 4 additions & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-mode = "apk"
patches-source = "revanced/revanced-patches"
integrations-source = "revanced/revanced-integrations"
cli-source = "j-hc/revanced-cli"
cli-source = "rahulkhatri137/revanced-cli"
excluded-patches = ""
included-patches = ""
version = "auto"
Expand All @@ -12,7 +12,7 @@ apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube/"
app-name = "YouTube"
patches-source = "YT-Advanced/ReX-patches"
integrations-source = "YT-Advanced/ReX-integrations"
cli-source = "inotia00/revanced-cli"
cli-source = "rahulkhatri137/revanced-cli"
rv-brand = "ReVanced Extended"
build-mode = "apk"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube/"
Expand All @@ -21,7 +21,7 @@ apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube/"
build-mode = "apk"
patches-source = "revanced/revanced-patches"
integrations-source = "revanced/revanced-integrations"
cli-source = "j-hc/revanced-cli"
cli-source = "rahulkhatri137/revanced-cli"
excluded-patches = ""
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music/"
apkmirror-arch = "arm64-v8a"
Expand All @@ -30,7 +30,7 @@ apkmirror-arch = "arm64-v8a"
app-name = "Music"
patches-source = "YT-Advanced/ReX-patches"
integrations-source = "YT-Advanced/ReX-integrations"
cli-source = "inotia00/revanced-cli"
cli-source = "rahulkhatri137/revanced-cli"
rv-brand = "ReVanced Extended"
build-mode = "apk"
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music/"
Expand Down

0 comments on commit cbfbc84

Please sign in to comment.