You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Add travis webhook for unnamed.py
(still requires setup)
This commit is contained in:
@@ -23,3 +23,5 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- make -j2 compare
|
- make -j2 compare
|
||||||
- check_status
|
- check_status
|
||||||
|
after_success:
|
||||||
|
- .travis/webhook.sh
|
||||||
|
18
.travis/webhook.sh
Executable file
18
.travis/webhook.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Only run this script if it's the master branch build.
|
||||||
|
[ "$TRAVIS_BRANCH" != 'master' -o "$TRAVIS_PULL_REQUEST" != 'false' ] && exit
|
||||||
|
|
||||||
|
root="$(realpath "$(dirname "$0")/..")"
|
||||||
|
content=""
|
||||||
|
|
||||||
|
# Report unnamed symbols
|
||||||
|
content+="$("$root/tools/unnamed.py" -r "$root" "$root/pokecrystal.sym" | grep -v -e '^lib/mobile/' -e '^mobile/' | head)"
|
||||||
|
|
||||||
|
curl -H 'Content-Type: application/json' -X POST "$POKECRYSTAL_DISCORD_WEBHOOK_URL" -d@- << EOF
|
||||||
|
{
|
||||||
|
"username": "$POKECRYSTAL_DISCORD_WEBHOOK_USERNAME",
|
||||||
|
"avatar_url": "$POKECRYSTAL_DISCORD_WEBHOOK_AVATAR_URL",
|
||||||
|
"content": "\`\`\`$(echo "$content" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')\`\`\`"
|
||||||
|
}
|
||||||
|
EOF
|
Reference in New Issue
Block a user