forked from lkorth/device-automator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_snapshot.sh
More file actions
executable file
·23 lines (20 loc) · 887 Bytes
/
deploy_snapshot.sh
File metadata and controls
executable file
·23 lines (20 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -e
SLUG="lkorth/device-automator"
JDK="oraclejdk8"
BRANCH="master"
if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo "Skipping snapshot deployment: was pull request."
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
elif [[ $(./gradlew :DeviceAutomator:properties | grep version) != *-SNAPSHOT ]]; then
echo "Skipping snapshot deployment: not a snapshot version."
else
echo "Deploying snapshot..."
./gradlew :DeviceAutomator:uploadArchives
echo "Snapshot deployed!"
fi