Update codeclimate env variable

This commit is contained in:
Benjamin Neff 2018-05-16 02:28:37 +02:00
parent 50ce162605
commit 44d92eebf1
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -14,17 +14,17 @@ if [[ ${BUNDLE_GEMFILE} =~ .*test/gemfiles/.*.Gemfile ]]; then
export NO_COVERAGE="true"
bundle exec rake --trace
else
if [[ -n ${CODECLIMATE_REPO_TOKEN} ]]; then
if [[ -n ${CC_TEST_REPORTER_ID} ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build --id ${CODECLIMATE_REPO_TOKEN}
./cc-test-reporter before-build
fi
bundle exec rake --trace
test_exit_code=$?
if [[ -n ${CODECLIMATE_REPO_TOKEN} ]]; then
./cc-test-reporter after-build --id ${CODECLIMATE_REPO_TOKEN} --exit-code ${test_exit_code}
if [[ -n ${CC_TEST_REPORTER_ID} ]]; then
./cc-test-reporter after-build --exit-code ${test_exit_code}
fi
exit ${test_exit_code}