remove branch check for hook.sh

This commit is contained in:
Bella 2020-04-26 21:59:49 -04:00
parent e721c9f785
commit ef9c1373c9
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 9 additions and 13 deletions

View File

@ -6,17 +6,13 @@ CUR_VER="$(tail -c +2 ./scripts/curVer)"
COMMIT_TRIM="${TRAVIS_COMMIT::7}"
COMMIT_MSG="$TRAVIS_COMMIT_MESSAGE"
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"
# 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"
# Find the release file and rename it to kamiblue-version-commit-release.jar
BUILD_DIR="$(readlink -f ./build/libs/)"
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
mv ${BUILD_DIR}/${JAR_DIR} ${BUILD_DIR}/kamiblue-${CUR_VER}-${COMMIT_TRIM}-release.jar
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
# Upload the release file
#curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK"
else
exit 0
fi
# Find the release file and rename it to kamiblue-version-commit-release.jar
BUILD_DIR="$(readlink -f ./build/libs/)"
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
mv ${BUILD_DIR}/${JAR_DIR} ${BUILD_DIR}/kamiblue-${CUR_VER}-${COMMIT_TRIM}-release.jar
JAR_DIR="$(ls "$BUILD_DIR" | grep "release")"
# Upload the release file
#curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK"