mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
new: Added example config files
This commit is contained in:
parent
086effe1b1
commit
e57d316969
8 changed files with 85 additions and 53 deletions
|
@ -1,45 +0,0 @@
|
|||
# These are the currently supported apps that can be built
|
||||
# Make a copy of this to your working directory
|
||||
# Then change the default values to enable/disable building them
|
||||
YT_NONROOT=true
|
||||
YTM_NONROOT=true
|
||||
YT_ROOT=false
|
||||
YTM_ROOT=false
|
||||
|
||||
# You can provide versions of apk for the builds
|
||||
# If anything nonempty is given, automatic version resolution
|
||||
# will be disabled
|
||||
# It's your job to make sure that the version is available
|
||||
# in APKPure
|
||||
YT_VERSION=
|
||||
YTM_VERSION=
|
||||
|
||||
# Settings for sending Telegram notification using telegram.sh
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# TOKEN and CHAT fields
|
||||
# Check out README for instructions
|
||||
TG_NOTIFICATIONS=false
|
||||
TELEGRAM_TOKEN=""
|
||||
TELEGRAM_CHAT=""
|
||||
|
||||
# Settings for uploading the files through telegram-upload
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# CHANNEL_ADDRESS field
|
||||
# Check out README for instructions
|
||||
TG_UPLOAD=false
|
||||
CHANNEL_ADDRESS=""
|
||||
|
||||
# Settings for sending Gotify notifications
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# URL and TOKEN fields
|
||||
# Check out README for instructions
|
||||
GOTIFY_NOTIFICATIONS=false
|
||||
GOTIFY_URL="https://push.example.com"
|
||||
GOTIFY_TOKEN=""
|
||||
|
||||
# Settings for sending ntfy.sh notifications
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# URL and TOPIC fields
|
||||
NTFY_NOTIFICATIONS=false
|
||||
NTFY_URL="https://ntfy.sh"
|
||||
NTFY_TOPIC=""
|
|
@ -1,3 +0,0 @@
|
|||
# EXCLUDE PATCHES FROM BELOW. DO NOT REMOVE THIS LINE
|
||||
|
||||
# INCLUDE PATCHES FROM BELOW. DO NOT REMOVE THIS LINE
|
51
example_configs/build_config
Normal file
51
example_configs/build_config
Normal file
|
@ -0,0 +1,51 @@
|
|||
# List all the applications to be built in their separate sections.
|
||||
# The version part is optional. If provided, automatic version determination
|
||||
# will be turned off. In that case, you're responsible for ensuring that the
|
||||
# version is present in APKPure.com
|
||||
|
||||
[youtube_nonroot]
|
||||
build = true
|
||||
pretty_name = YouTube
|
||||
apk = com.google.android.youtube
|
||||
apkpure_appname = youtube
|
||||
root = false
|
||||
# Timestamp and extension will be added automatically
|
||||
output_name = YouTube_ReVanced_nonroot
|
||||
keystore = revanced-yt-nonroot.keystore
|
||||
# version = version
|
||||
|
||||
[youtube_root]
|
||||
build = false
|
||||
pretty_name = YouTube (root)
|
||||
apk = com.google.android.youtube
|
||||
apkpure_appname = youtube
|
||||
root = true
|
||||
# Timestamp and extension will be added automatically
|
||||
output_name = YouTube_ReVanced_root
|
||||
keystore = revanced-yt-root.keystore
|
||||
# version = "version"
|
||||
|
||||
[youtube_music]
|
||||
build = true
|
||||
pretty_name = YouTube Music
|
||||
apk = com.google.android.apps.youtube.music
|
||||
apkpure_appname = youtube-music
|
||||
root = false
|
||||
# Timestamp and extension will be added automatically
|
||||
output_name = YouTube_Music_ReVanced_nonroot
|
||||
keystore = revanced-ytm-nonroot.keystore
|
||||
version = 6.10.52
|
||||
|
||||
[youtube_music_root]
|
||||
build = false
|
||||
pretty_name = YouTube Music (root)
|
||||
apk = com.google.android.apps.youtube.music
|
||||
apkpure_appname = youtube-music
|
||||
root = true
|
||||
# Timestamp and extension will be added automatically
|
||||
output_name = YouTube_Music_ReVanced_root
|
||||
keystore = revanced-ytm-root.keystore
|
||||
version = 6.10.52
|
||||
|
||||
[post_script]
|
||||
# file = post_script.sh
|
4
example_configs/chosen_patches
Normal file
4
example_configs/chosen_patches
Normal file
|
@ -0,0 +1,4 @@
|
|||
[patches]
|
||||
# Both have to be comma separated lists of patches
|
||||
included = []
|
||||
excluded = []
|
25
example_configs/notification_config
Normal file
25
example_configs/notification_config
Normal file
|
@ -0,0 +1,25 @@
|
|||
[telegram]
|
||||
# Settings for sending Telegram notification using telegram.sh
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# TOKEN and CHAT fields
|
||||
# Check out README for instructions
|
||||
# enabled = true
|
||||
# chat = url
|
||||
# token = token
|
||||
|
||||
[gotify]
|
||||
# Settings for sending Gotify notifications
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# URL and TOKEN fields
|
||||
# Check out README for instructions
|
||||
# enabled = true
|
||||
# URL = url
|
||||
# token = token
|
||||
|
||||
[ntfy]
|
||||
# Settings for sending ntfy.sh notifications
|
||||
# In case you decide to use it, please put valid config in the
|
||||
# URL and TOPIC fields
|
||||
enabled = false
|
||||
url = url
|
||||
topic = topic
|
|
@ -88,7 +88,7 @@ def get_apks(appstate):
|
|||
pretty_name = build_config[app]['pretty_name']
|
||||
apkpure_appname = build_config[app]['apkpure_appname']
|
||||
except:
|
||||
clean_exit(f"Invalid config for {app} in build_config.toml!", appstate)
|
||||
clean_exit(f"Invalid config for {app} in build_config!", appstate)
|
||||
|
||||
print(f"Checking {pretty_name}...")
|
||||
try:
|
||||
|
|
|
@ -18,7 +18,7 @@ def build_apps(appstate):
|
|||
print = appstate['logger'].info
|
||||
|
||||
chosen_patches = cp.ConfigParser()
|
||||
chosen_patches.read('chosen_patches.toml')
|
||||
chosen_patches.read('chosen_patches')
|
||||
|
||||
try:
|
||||
included_patches = json.loads(chosen_patches['patches']['included'])
|
||||
|
@ -66,7 +66,7 @@ def build_apps(appstate):
|
|||
apkpure_appname = build_config[app]['apkpure_appname']
|
||||
output_name = build_config[app]['output_name']
|
||||
except:
|
||||
clean_exit(f"Invalid config for {app} in build_config.toml!", appstate)
|
||||
clean_exit(f"Invalid config for {app} in build_config!", appstate)
|
||||
|
||||
cmd += f" -a {apk}.apk -o {output_name}.apk"
|
||||
|
||||
|
|
|
@ -135,12 +135,12 @@ print('----------------------------------------------------------------------')
|
|||
# Read configs
|
||||
try:
|
||||
appstate['build_config']=cp.ConfigParser()
|
||||
appstate['build_config'].read_file(open('build_config.toml', 'r'))
|
||||
appstate['build_config'].read_file(open('build_config', 'r'))
|
||||
except FileNotFoundError:
|
||||
clean_exit('No build config provided, exiting. Please look at the GitHub page for more information:\n https://github.com/SinTan1729/ReVancedBuilder', appstate)
|
||||
|
||||
appstate['notification_config'] = cp.ConfigParser()
|
||||
appstate['notification_config'].read('notification_config.toml')
|
||||
appstate['notification_config'].read('notification_config')
|
||||
|
||||
# Pull the latest information using the ReVanced API
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue