mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-27 05:08:35 -06:00
new: Added support for ntfy.sh
This commit is contained in:
parent
53c430d75a
commit
d72ce0ea51
2 changed files with 21 additions and 0 deletions
|
@ -277,6 +277,20 @@ if $GOTIFY_NOTIFICATIONS; then
|
||||||
-F "title=⚙⚙⚙ Build Details ⚙⚙⚙" -F "message=$MESSAGE" -F "priority=5"
|
-F "title=⚙⚙⚙ Build Details ⚙⚙⚙" -F "message=$MESSAGE" -F "priority=5"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $NTFY_NOTIFICATIONS; then
|
||||||
|
echo "Sending messages to ntfy.sh"
|
||||||
|
MESSAGE="$msg"$'\n'"Timestamp: $timestamp"
|
||||||
|
curl -H "Icon: https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Revanced-logo-round.svg/240px-Revanced-logo-round.svg.png" \
|
||||||
|
-H "Title: ⚙⚙⚙ ReVanced Build ⚙⚙⚙" \
|
||||||
|
-d "$MESSAGE" \
|
||||||
|
"$NTFY_URL/$NTFY_TOPIC"
|
||||||
|
MESSAGE="An update of microg was published."
|
||||||
|
[ $microg_updated ] && curl -H "Icon: https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Revanced-logo-round.svg/240px-Revanced-logo-round.svg.png" \
|
||||||
|
-H "Title: ⚙⚙⚙ ReVanced Build ⚙⚙⚙" \
|
||||||
|
-d "$MESSAGE" \
|
||||||
|
"$NTFY_URL/$NTFY_TOPIC"
|
||||||
|
fi
|
||||||
|
|
||||||
# Do some cleanup, keep only the last 3 build's worth of files and a week worth of logs
|
# Do some cleanup, keep only the last 3 build's worth of files and a week worth of logs
|
||||||
mkdir -p archive
|
mkdir -p archive
|
||||||
mv *ReVanced_*_$timestamp.apk archive/
|
mv *ReVanced_*_$timestamp.apk archive/
|
||||||
|
|
|
@ -28,3 +28,10 @@ CHANNEL_ADDRESS=""
|
||||||
GOTIFY_NOTIFICATIONS=false
|
GOTIFY_NOTIFICATIONS=false
|
||||||
GOTIFY_URL="https://push.example.com"
|
GOTIFY_URL="https://push.example.com"
|
||||||
GOTIFY_TOKEN=""
|
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=""
|
||||||
|
|
Loading…
Reference in a new issue