aboutsummaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-06-28 20:23:26 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-06-28 20:23:26 -0400
commitc1512d39a7de1e811272efa7d0755c2e4cb84e06 (patch)
treec2e0d4c37e221fe33d7a9d93003ff36af772bbf7 /.travis
parentUse --preserve instead of a hard-coded blank tile (diff)
downloadpokeyellow-c1512d39a7de1e811272efa7d0755c2e4cb84e06.tar.gz
pokeyellow-c1512d39a7de1e811272efa7d0755c2e4cb84e06.tar.xz
pokeyellow-c1512d39a7de1e811272efa7d0755c2e4cb84e06.zip
Add Travis webhook for tools/unnamed.py
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/webhook.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/.travis/webhook.sh b/.travis/webhook.sh
new file mode 100755
index 00000000..e50f3c29
--- /dev/null
+++ b/.travis/webhook.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+root="$(readlink -e "$(dirname "$0")/..")"
+
+# Report unnamed symbols
+content="$("$root/tools/unnamed.py" -r "$root" "$root/pokered.sym" | head)"
+
+curl -H 'Content-Type: application/json' -X POST "$POKERED_DISCORD_WEBHOOK_URL" -d@- << EOF
+{
+ "username": "$POKERED_DISCORD_WEBHOOK_USERNAME",
+ "avatar_url": "$POKERED_DISCORD_WEBHOOK_AVATAR_URL",
+ "content": "\`\`\`$(echo "$content" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')\`\`\`"
+}
+EOF