-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshippable.bash
38 lines (30 loc) · 1.04 KB
/
shippable.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# CI steps for this repository
# Author: Roland Kluge
# Date: 2017-02-20
if [ ! -d "$ANDROID_HOME" ];
then
echo "The ANDROID_HOME variable should point to the Android SDK installation. But is currently set to '$ANDROID_HOME'"
exit -1
fi
# Build Android application
cd ./android
# Accept licenses by copying the Android license to the Android SDK home
# See also: https://developer.android.com/studio/intro/update.html#download-with-gradle
mkdir -p $ANDROID_HOME/licenses
cp -r ./licenses/* $ANDROID_HOME/licenses
echo "License files in $ANDROID_HOME/licenses"
ll $ANDROID_HOME/licenses
bash ./gradlew clean test assemble
exitCode=$?
[ "$exitCode" == "0" ] || exit $exitCode
cd ..
exit 0
# Provide test reports to Shippable
targetDirectoryForTestResults=/root/src/github.com/Echtzeitsysteme/able/shippable/testresults
if [ -d $targetDirectoryForTestResults ];
then
find ./android -name "TEST-*.xml" | xargs cp -t $targetDirectoryForTestResults
else
echo "Target directory for test results is missing: $targetDirectoryForTestResults"
fi