Skip to content

Commit 7d937b0

Browse files
committed
build(credentials): Do not attempt to install credentials if this is a PR
1 parent ef4eb28 commit 7d937b0

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Travis/installSDK.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
#! /bin/sh
22
project="unity-sdk-travis"
33

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/
67

7-
if [ $? = 0 ] ; then
8-
echo "Credentials install SUCCEEDED! Exited with $?"
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
914
else
10-
echo "Credentials install FAILED! Exited with $?"
11-
exit 1
15+
echo "This is a pull request - do not attempt to install credentials"
1216
fi
1317

14-
1518
echo "Attempting to install IBM Watson SDK for Unity into the test project..."
1619
mkdir -p Travis/UnityTestProject/Assets/Watson/
1720
git clone -b $TRAVIS_BRANCH https://github.com/watson-developer-cloud/unity-sdk.git Travis/UnityTestProject/Assets/Watson/

0 commit comments

Comments
 (0)