kami-blue/scripts/hook.sh

10 lines
347 B
Bash
Raw Normal View History

2020-03-10 22:31:43 +00:00
#!/bin/bash
# Send message with branch name
2020-03-10 23:52:37 +00:00
curl -H "Content-Type: application/json" -X POST -d '{"username": "KAMI Blue Releases", "content": "**Branch:** '$BRANCH'"}' "$WEBHOOK"
2020-03-10 22:31:43 +00:00
# Upload the release file
BUILD_DIR="$(readlink -f ./build/libs/)"
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK"