forked from ldtteam/minecolonies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dropbox.sh
executable file
·27 lines (22 loc) · 1.15 KB
/
dropbox.sh
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
#!/bin/bash
rm -rfv ~/.dropbox_uploader
echo "OAUTH_ACCESS_TOKEN=$OAUTH_ACCESS_TOKEN" > ~/.dropbox_uploader
curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o ~/dropbox_uploader.sh
chmod +x ~/dropbox_uploader.sh
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
~/dropbox_uploader.sh mkdir "branch"
~/dropbox_uploader.sh mkdir "branch/$TRAVIS_BRANCH"
~/dropbox_uploader.sh upload ./build/libs/*univ*.jar "branch/$TRAVIS_BRANCH"
~/dropbox_uploader.sh upload ./build/libs/*deobf*.jar "branch/$TRAVIS_BRANCH"
~/dropbox_uploader.sh upload ./build/libs/*sources*.jar "branch/$TRAVIS_BRANCH"
else
~/dropbox_uploader.sh mkdir "pr"
~/dropbox_uploader.sh mkdir "pr/$TRAVIS_PULL_REQUEST"
~/dropbox_uploader.sh upload ./build/libs/*univ*.jar "pr/$TRAVIS_PULL_REQUEST"
~/dropbox_uploader.sh upload ./build/libs/*sources*.jar "pr/$TRAVIS_PULL_REQUEST"
~/dropbox_uploader.sh upload ./build/libs/*deobf*.jar "pr/$TRAVIS_PULL_REQUEST"
fi
if [ "$TRAVIS_BRANCH" = "develop" ] || [ "$TRAVIS_BRANCH" = "master" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
curl -s $UPLOADER_GENERATE_URL
fi
exit 0