diff options
author | chinhodado <chin.bimbo@gmail.com> | 2015-01-15 02:49:26 +0100 |
---|---|---|
committer | Chin <chin.bimbo@gmail.com> | 2015-01-24 18:36:34 +0100 |
commit | d7ed08b153ee6f86a640be47050bda7db3257962 (patch) | |
tree | 7db0c06ba26483b0ce8f758c9f20538ffc27dd3e /upload_to_mega.js | |
parent | Merge pull request #410 from chinhodado/cleanup (diff) | |
download | yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.gz yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.bz2 yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.lz yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.xz yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.zst yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.zip |
Diffstat (limited to '')
-rw-r--r-- | upload_to_mega.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/upload_to_mega.js b/upload_to_mega.js new file mode 100644 index 000000000..1d47f4fd8 --- /dev/null +++ b/upload_to_mega.js @@ -0,0 +1,25 @@ +var util = require('util'); +var exec = require('child_process').exec; + +var email = 'chin.bimbo@gmail.com'; +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"; + +var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --username=%s --password=%s --no-progress', + sourceFileName, + dstFileName, + email, + password); + +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); + } + }); +} |