mirror of https://git.suyu.dev/suyu/suyu
CI: upload builds to builds.citra-emu.org instead of MEGA
parent
b56829df02
commit
6cc1a07235
@ -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
|
@ -1,28 +0,0 @@
|
|||||||
var util = require('util');
|
|
||||||
var exec = require('child_process').exec;
|
|
||||||
var sanitize = require("sanitize-filename");
|
|
||||||
|
|
||||||
var email = process.env.MEGA_EMAIL;
|
|
||||||
var password = process.env.MEGA_PASSWORD;
|
|
||||||
var sourceFileName = 'build.7z';
|
|
||||||
var dstFileName = process.env.APPVEYOR_REPO_COMMIT.substring(0, 8) + " - " +
|
|
||||||
process.env.APPVEYOR_REPO_COMMIT_MESSAGE.substring(0, 100) + ".7z";
|
|
||||||
dstFileName = sanitize(dstFileName);
|
|
||||||
|
|
||||||
var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --username=%s --password=%s --no-progress',
|
|
||||||
sourceFileName,
|
|
||||||
dstFileName,
|
|
||||||
email,
|
|
||||||
password);
|
|
||||||
|
|
||||||
// only upload build on master branch, and not on other branches or PRs
|
|
||||||
if (process.env.APPVEYOR_REPO_BRANCH == "master") {
|
|
||||||
console.log("Uploading file " + dstFileName + " to Mega...");
|
|
||||||
exec(cmd, function(error, stdout, stderr) {
|
|
||||||
console.log('stdout: ' + stdout);
|
|
||||||
console.log('stderr: ' + stderr);
|
|
||||||
if (error !== null) {
|
|
||||||
console.log('exec error: ' + error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue