aboutsummaryrefslogtreecommitdiffhomepage
path: root/.travis-upload.sh
diff options
context:
space:
mode:
authorGravatar archshift <gh@archshift.com>2015-03-06 15:54:09 -0800
committerGravatar archshift <gh@archshift.com>2015-03-16 18:09:20 -0700
commit6cc1a0723583817d1c1bad13db5167c07aa84aa2 (patch)
treeb4fd54fd6347e6d114819536bfd7fe8f95c68ecc /.travis-upload.sh
parentb56829df020a81248dd04688ff2b307f3444a09f (diff)
CI: upload builds to builds.citra-emu.org instead of MEGA
Diffstat (limited to '.travis-upload.sh')
-rw-r--r--.travis-upload.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/.travis-upload.sh b/.travis-upload.sh
new file mode 100644
index 00000000..4b9446a9
--- /dev/null
+++ b/.travis-upload.sh
@@ -0,0 +1,29 @@
+if [ "$TRAVIS_BRANCH" = "master" ]; then
+ GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
+ GITREV="`git show -s --format='%h'`"
+
+ if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
+ REV_NAME="citra-${GITDATE}-${GITREV}-linux-amd64"
+ UPLOAD_DIR="/citra/nightly/linux-amd64"
+ mkdir "$REV_NAME"
+
+ sudo apt-get -qq install lftp
+ cp build/src/citra/citra "$REV_NAME"
+ cp build/src/citra_qt/citra-qt "$REV_NAME"
+ elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ REV_NAME="citra-${GITDATE}-${GITREV}-osx-amd64"
+ UPLOAD_DIR="/citra/nightly/osx-amd64"
+ mkdir "$REV_NAME"
+
+ brew install lftp
+ cp build/src/citra/Release/citra "$REV_NAME"
+ cp -r build/src/citra_qt/Release/citra-qt.app "$REV_NAME"
+
+ # move qt libs into app bundle for deployment
+ $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app"
+ fi
+
+ ARCHIVE_NAME="${REV_NAME}.tar.xz"
+ tar -cJvf "$ARCHIVE_NAME" "$REV_NAME"
+ lftp -c "open -u citra-builds,$BUILD_PASSWORD sftp://builds.citra-emu.org; put -O '$UPLOAD_DIR' '$ARCHIVE_NAME'"
+fi