summaryrefslogtreecommitdiff
path: root/.github/calcrom/webhook.sh
diff options
context:
space:
mode:
Diffstat (limited to '.github/calcrom/webhook.sh')
-rw-r--r--.github/calcrom/webhook.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/.github/calcrom/webhook.sh b/.github/calcrom/webhook.sh
index c15e9b50..60726c7d 100644
--- a/.github/calcrom/webhook.sh
+++ b/.github/calcrom/webhook.sh
@@ -7,12 +7,14 @@ fi
build_name=$1
url=$2
-map_file=$(dirname "$0")/../../arm9/build/diamond.us/arm9.elf.xMAP
+build_subdir=${1//poke/}.us
+arm9name=${arm9name:-arm9.elf}
+map_file=$(dirname "$0")/../../arm9/build/${build_subdir}/${arm9name}.xMAP
if [ ! -f $map_file ]; then
echo "$map_file does not exist!"
exit 1
fi
make -C ${GITHUB_WORKSPACE}/.github/calcrom
-output=$(${GITHUB_WORKSPACE}/.github/calcrom/calcrom ${GITHUB_WORKSPACE} | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
+output=$(${GITHUB_WORKSPACE}/.github/calcrom/calcrom -d ${GITHUB_WORKSPACE} -9 arm9 -7 arm7 diamond.us pearl.us | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST $url