Comment out the code for upload

This commit is contained in:
Sayantan Santra 2022-12-06 20:11:53 -06:00
parent 63aae8c589
commit 527d099dc3
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# Revanced Builder
This repo will allow one to build [ReVanced](https://github.com/revanced/) apps automatically and post it to a telegram channel to access and possibly share the builds with friends. It uses [telegram.sh](https://github.com/fabianonline/telegram.sh) to send messages and [telegram-upload](https://github.com/Nekmo/telegram-upload) to upload files. Make sure that `Java >=17` is installed and selected as default.
This repo will allow one to build [ReVanced](https://github.com/revanced/) apps automatically and post it to a telegram channel to access and possibly share the builds with friends. It uses [telegram.sh](https://github.com/fabianonline/telegram.sh) to send messages and [telegram-upload](https://github.com/Nekmo/telegram-upload) to upload files (optionally, commented out by default). Make sure that `Java >=17` is installed and selected as default.
## How to use
Just run `./build_revanced <working-directory> (force/clean/experimental/checkonly)`. Might be a good idea to set it up to run periodically using cron. I currently use the following in a user crontab to run it everyday at 6 AM:
@ -10,7 +10,7 @@ Just run `./build_revanced <working-directory> (force/clean/experimental/checkon
## Notes
- The script will download the **automatically selected compatible version** (using compatibility of patches as listed [here](https://github.com/revanced/revanced-patches#list-of-available-patches)) of Youtube on APKMirror, **NOT** latest official version on Google Play.
- Under **NO CIRCUMSTANCES** any APKs will be uploaded to this repository to avoid DMCA.
- The script assumes that the working directory has the `telegram.sh` script along with a working config file, and `telegram-upload` installed and working with the channel link saved in a file called `channel_address`. For their config, look at the links provided on top.
- The script assumes that the working directory has the `telegram.sh` script along with a working config file and optionally `telegram-upload` installed and working with the channel link saved in a file called `channel_address`. For their config, look at the links provided on top.
- In the current configuration, the script only builds YouTube ReVanced and YouTube Music ReVanced (both nonroot), but it's easy to add support for any other ReVanced app. The code for root builds is included but commented out.
- All the packages are pulled from [APKMirror](https://apkmirror.com) and GitHub (the `revanced/*` repos).

View File

@ -205,14 +205,15 @@ mv revanced-ytm-nonroot.apk YouTube_Music_ReVanced_nonroot_$timestamp.apk
echo "Sending messages to telegram"
# telegram-upload uses personal account, hence bypassing 50 MB max upload limit of bots
channel_address=$(cat channel_address | sed -z '$ s/\n$//')
/home/sintan/.local/bin/telegram-upload YouTube_ReVanced_nonroot_$timestamp.apk YouTube_Music_ReVanced_nonroot_$timestamp.apk --to "$channel_address" --caption "" && sent=true
# channel_address=$(cat channel_address | sed -z '$ s/\n$//')
# /home/sintan/.local/bin/telegram-upload YouTube_ReVanced_nonroot_$timestamp.apk YouTube_Music_ReVanced_nonroot_$timestamp.apk --to "$channel_address" --caption "" && sent=true
# telegram.sh uses bot account, but it supports formatted messages
msg=$(cat versions.json | tail -n+2 | head -n-1 | cut -c3- | sed "s/\"//g" | sed "s/,//g" | sed "s/com.google.android.apps.youtube.music/YouTube Music/" \
| sed "s/com.google.android.youtube/YouTube/" | sed "s/VancedMicroG/Vanced microG/" | sed "s/revanced-/ReVanced /g" | sed "s/patches/Patches/" \
| sed "s/cli/CLI/" | sed "s/integrations/Integrations/" | awk 1 ORS=$'\n') # I know, it's a hacky solution
[ $sent ] && ./telegram.sh -T "⚙⚙⚙ Build Details ⚙⚙⚙" -M "$msg"$'\n'"⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯"
# [ $sent ] &&
./telegram.sh -T "⚙⚙⚙ Build Details ⚙⚙⚙" -M "$msg"$'\n'"⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯"
[ $microg_updated ] && ./telegram.sh -M "_An update of microg was published. Please download it from the link in the pinned message._"
# Do some cleanup, keep only the last 3 build's worth of files and a week worth of logs