|
1 | 1 | #! /bin/sh
|
2 | 2 | project="unity-sdk-travis"
|
3 | 3 |
|
4 |
| -echo "Attempting to install credentials" |
5 |
| -git clone https://$CREDENTIALS_GITHUB_TOKEN@github.ibm.com/germanatt/sdk-credentials.git Travis/sdk-credentials/ |
| 4 | +if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then |
| 5 | + echo "Attempting to install credentials" |
| 6 | + git clone https://$CREDENTIALS_GITHUB_TOKEN@github.ibm.com/germanatt/sdk-credentials.git Travis/sdk-credentials/ |
6 | 7 |
|
7 |
| -if [ $? = 0 ] ; then |
8 |
| - echo "Credentials install SUCCEEDED! Exited with $?" |
9 |
| - export IBM_CREDENTIALS_FILE=$(pwd)/Travis/sdk-credentials/ibm-credentials.env |
| 8 | + if [ $? = 0 ] ; then |
| 9 | + echo "Credentials install SUCCEEDED! Exited with $?" |
| 10 | + else |
| 11 | + echo "Credentials install FAILED! Exited with $?" |
| 12 | + exit 1 |
| 13 | + fi |
10 | 14 | else
|
11 |
| - echo "Credentials install FAILED! Exited with $?" |
12 |
| - exit 1 |
| 15 | + echo "This is a pull request - do not attempt to install credentials" |
13 | 16 | fi
|
14 | 17 |
|
15 |
| - |
16 | 18 | echo "Attempting to install IBM Watson SDK for Unity into the test project..."
|
17 | 19 | mkdir -p Travis/UnityTestProject/Assets/Watson/
|
18 | 20 | git clone -b $TRAVIS_BRANCH https://github.com/watson-developer-cloud/unity-sdk.git Travis/UnityTestProject/Assets/Watson/
|
19 | 21 |
|
20 | 22 | if [ $? = 0 ] ; then
|
21 | 23 | echo "WDC Unity SDK install SUCCEEDED! Exited with $?"
|
22 | 24 |
|
| 25 | + echo "Attempting to remove TravisIntegrationTests from Travis directory..." |
| 26 | + rm Travis/TravisIntegrationTests.cs |
| 27 | + if [ $? = 0 ] ; then |
| 28 | + echo "Removing travis build script SUCCEEDED! Exited with $?" |
| 29 | + else |
| 30 | + echo "Removing travis build script FAILED! Exited with $?" |
| 31 | + exit 1 |
| 32 | + fi |
| 33 | + |
23 | 34 | echo "Attempting to create Travis/UnityTestProject/Assets/Scripts/Editor/"
|
24 | 35 | mkdir -p Travis/UnityTestProject/Assets/Scripts/Editor/
|
25 | 36 | if [ $? = 0 ] ; then
|
26 | 37 | echo "Creating Travis/UnityTestProject/Assets/Scripts/Editor/ SUCCEEDED! Exited with $?"
|
| 38 | + |
| 39 | + echo "Attempting to move integration tests script..." |
| 40 | + mv Travis/UnityTestProject/Assets/Watson/Travis/TravisIntegrationTests.cs Travis/UnityTestProject/Assets/Scripts/Editor/TravisIntegrationTests.cs |
| 41 | + if [ $? = 0 ] ; then |
| 42 | + echo "Moving travis integration tests script SUCCEEDED! Exited with $?" |
| 43 | + exit 0 |
| 44 | + else |
| 45 | + echo "Moving travis integration tests script FAILED! Exited with $?" |
| 46 | + exit 1 |
| 47 | + fi |
27 | 48 | else
|
28 | 49 | echo "Creating Travis/UnityTestProject/Assets/Scripts/Editor/ FAILED! EXITED WITH $?"
|
29 | 50 | fi
|
|
0 commit comments