Correctly return exit code

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2021-07-07 09:11:21 +02:00
parent 8ac7d46e0f
commit 870e979f12
No known key found for this signature in database
GPG Key ID: 0E00D4D47D0C5AF7

View File

@ -15,25 +15,26 @@ scripts/deleteOutdatedComments.sh "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAM
scripts/wait_for_emulator.sh scripts/wait_for_emulator.sh
./gradlew jacocoTestGplayDebugUnitTestReport ./gradlew jacocoTestGplayDebugUnitTestReport
status=$(( $status | $? )) stat=$?
if [ ! $status -eq 0 ]; then if [ ! $stat -eq 0 ]; then
bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
fi fi
./gradlew installGplayDebugAndroidTest ./gradlew installGplayDebugAndroidTest
scripts/wait_for_server.sh "server" scripts/wait_for_server.sh "server"
./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest ./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest
status=$(( $status | $? )) stat=$(( stat | $? ))
if [ ! $status -eq 0 ]; then if [ ! $stat -eq 0 ]; then
bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN
fi fi
./gradlew combinedTestReport ./gradlew combinedTestReport
status=$(( $status | $? )) stat=$(( stat | $? ))
curl -o codecov.sh https://codecov.io/bash curl -o codecov.sh https://codecov.io/bash
bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5 bash ./codecov.sh -t fc506ba4-33c3-43e4-a760-aada38c24fd5
exit $status echo "Exit with: " $stat
exit $stat