Do later; we'll live with it for now.

This commit is contained in:
Dewy REDACTED 2020-04-05 11:51:45 +01:00
parent 5df8bf984b
commit 38f357bae7
1 changed files with 2 additions and 10 deletions

View File

@ -5,23 +5,15 @@ if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then exit 0; else echo "">/dev/null;
COMMIT_TRIM="${TRAVIS_COMMIT::7}" COMMIT_TRIM="${TRAVIS_COMMIT::7}"
COMMIT_MSG="$TRAVIS_COMMIT_MESSAGE" COMMIT_MSG="$TRAVIS_COMMIT_MESSAGE"
# TODO: Rename jar to from client to kamiblue.
if [[ "$BRANCH" == "master" ]]; then if [[ "$BRANCH" == "master" ]]; then
# Send message with branch name # Send message with branch name
curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "","color": 10195199,"description": "**Changelog:** '"$COMMIT_MSG"'\nBranch: `'"$BRANCH"'`\nCommit: ['${COMMIT_TRIM}'](https://github.com/kami-blue/client/commits/'${COMMIT_TRIM}') Direct: ['${COMMIT_TRIM}'](https://github.com/kami-blue/client/commit/'${TRAVIS_COMMIT}') "}]}' "$WEBHOOK" curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "","color": 10195199,"description": "**Changelog:** '"$COMMIT_MSG"'\nBranch: `'"$BRANCH"'`\nCommit: ['${COMMIT_TRIM}'](https://github.com/kami-blue/client/commits/'${COMMIT_TRIM}') Direct: ['${COMMIT_TRIM}'](https://github.com/kami-blue/client/commit/'${TRAVIS_COMMIT}') "}]}' "$WEBHOOK"
# TODO: Fix the file uploading, it ain't working chief
# 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"
ls # debug, sorry for the messages ;-;
mv ${JAR_DIR} ${BUILD_DIR}/kamiblue-1.1.2-release-${COMMIT_TRIM}.jar
JAR_DIR="$(ls "$BUILD_DIR" | grep "$COMMIT_TRIM")"
curl -F content=@"$JAR_DIR" "$WEBHOOK"
else else
exit 0 exit 0
fi fi