summaryrefslogtreecommitdiffstats
path: root/upload_to_mega.js
diff options
context:
space:
mode:
authorChin <chin.bimbo@gmail.com>2015-01-24 16:45:06 +0100
committerChin <chin.bimbo@gmail.com>2015-01-24 18:36:49 +0100
commita4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204 (patch)
tree97e44054401215563fad0555ac07d43ce6f80942 /upload_to_mega.js
parentAppVeyor: Change to release build instead of debug (diff)
downloadyuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.tar
yuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.tar.gz
yuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.tar.bz2
yuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.tar.lz
yuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.tar.xz
yuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.tar.zst
yuzu-a4a1ce766d9ac0284e4bb28a1c3f7f0f3d1a6204.zip
Diffstat (limited to '')
-rw-r--r--upload_to_mega.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/upload_to_mega.js b/upload_to_mega.js
index 1d47f4fd8..c0abd5ed5 100644
--- a/upload_to_mega.js
+++ b/upload_to_mega.js
@@ -1,11 +1,13 @@
var util = require('util');
var exec = require('child_process').exec;
+var sanitize = require("sanitize-filename");
-var email = 'chin.bimbo@gmail.com';
+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,
@@ -13,6 +15,7 @@ var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --usernam
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) {