From 38f357bae70c9e4d3a14a242a81e7f89c1e0874e Mon Sep 17 00:00:00 2001 From: Dewy REDACTED Date: Sun, 5 Apr 2020 11:51:45 +0100 Subject: [PATCH] Do later; we'll live with it for now. --- scripts/hook.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/hook.sh b/scripts/hook.sh index 8b55034a..7bfde300 100755 --- a/scripts/hook.sh +++ b/scripts/hook.sh @@ -5,23 +5,15 @@ if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then exit 0; else echo "">/dev/null; COMMIT_TRIM="${TRAVIS_COMMIT::7}" COMMIT_MSG="$TRAVIS_COMMIT_MESSAGE" +# TODO: Rename jar to from client to kamiblue. if [[ "$BRANCH" == "master" ]]; then # 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" - # TODO: Fix the file uploading, it ain't working chief - # Upload the release file BUILD_DIR="$(readlink -f ./build/libs/)" JAR_DIR="$(ls "$BUILD_DIR" | grep "release")" - - 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" + curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK" else exit 0 fi \ No newline at end of file