forked from RepoMirrors/kami-blue
exit 0 if the branch doesn't match
This commit is contained in:
parent
837bf8580a
commit
11df8e0a6e
|
@ -1,9 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Send message with branch name
|
if [[ "$BRANCH" == "feature/master" ]]; then
|
||||||
curl -H "Content-Type: application/json" -X POST -d '{"username": "KAMI Blue Releases", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"
|
# Send message with branch name
|
||||||
|
curl -H "Content-Type: application/json" -X POST -d '{"username": "KAMI Blue Releases", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"
|
||||||
|
|
||||||
# Upload the release file
|
# Upload the release file
|
||||||
BUILD_DIR="$(readlink -f ./build/libs/)"
|
BUILD_DIR="$(readlink -f ./build/libs/)"
|
||||||
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
|
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
|
||||||
curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK"
|
curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK"
|
||||||
|
elif [[ "$BRANCH" == "feature/safecrystal#480" ]]; then
|
||||||
|
# Send message with branch name
|
||||||
|
curl -H "Content-Type: application/json" -X POST -d '{"username": "KAMI Blue Releases", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue