From 454dc66303dbe7bc9ab39f7cc85602f717937d92 Mon Sep 17 00:00:00 2001 From: Bella Date: Sat, 25 Apr 2020 12:20:59 -0400 Subject: [PATCH] Remove preHook and hook scripts for #download Unfortunately the files are too big to do so, so we're doing weekly downloads from now on, on the website --- .travis.yml | 5 +---- scripts/hook.sh | 22 ---------------------- scripts/preHook.sh | 8 -------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100755 scripts/hook.sh delete mode 100755 scripts/preHook.sh diff --git a/.travis.yml b/.travis.yml index 96aba673..0e48474d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: java jdk: - openjdk8 before_install: -- "./scripts/preHook.sh" -- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) - chmod +x gradlew - "./gradlew setupDecompWorkspace" deploy: @@ -16,5 +14,4 @@ deploy: on: repo: kami-blue/client tags: true -after_success: -- "./scripts/hook.sh" + diff --git a/scripts/hook.sh b/scripts/hook.sh deleted file mode 100755 index 7ed3a268..00000000 --- a/scripts/hook.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then exit 0; else echo "">/dev/null; fi - -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" - - # 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 \ No newline at end of file diff --git a/scripts/preHook.sh b/scripts/preHook.sh deleted file mode 100755 index 56126257..00000000 --- a/scripts/preHook.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -CUR_VER="$(cat ./scripts/curVer)" -COMMIT_TRIM="${TRAVIS_COMMIT::7}" - -sed -i "s/modVersion=.*/modVersion=${CUR_VER:1}-$COMMIT_TRIM/" gradle.properties -sed -i "s/\"version\": \".*\",/\"version\": \"${CUR_VER:1}-$COMMIT_TRIM\",/" src/main/resources/mcmod.info -sed -i "s/MODVER = \".*\";/MODVER = \"$CUR_VER-$COMMIT_TRIM\";/" src/main/java/me/zeroeightsix/kami/KamiMod.java