summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar chinhodado2015-01-14 20:49:26 -0500
committerGravatar Chin2015-01-24 12:36:34 -0500
commitd7ed08b153ee6f86a640be47050bda7db3257962 (patch)
tree7db0c06ba26483b0ce8f758c9f20538ffc27dd3e
parentMerge pull request #410 from chinhodado/cleanup (diff)
downloadyuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.gz
yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.tar.xz
yuzu-d7ed08b153ee6f86a640be47050bda7db3257962.zip
AppVeyor: Upload build to Mega upon build completion
-rw-r--r--appveyor.yml26
-rw-r--r--upload_to_mega.js25
2 files changed, 51 insertions, 0 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 83d3b900e..d3fb3fe65 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -6,6 +6,8 @@ clone_depth: 1
6 6
7environment: 7environment:
8 QTDIR: C:\Qt\5.4\msvc2013_opengl 8 QTDIR: C:\Qt\5.4\msvc2013_opengl
9 MEGA_PASSWORD:
10 secure: ozgp54EZj98kcbD/O+Xl5Q==
9 11
10install: 12install:
11 - git submodule update --init --recursive 13 - git submodule update --init --recursive
@@ -15,3 +17,27 @@ before_build:
15 - cd build 17 - cd build
16 - cmake .. 18 - cmake ..
17 - cd .. 19 - cd ..
20
21after_build:
22 # upload the build to Mega
23 - cinst wget -x86
24 - wget -q http://megatools.megous.com/builds/megatools-1.9.94-win64.zip
25 # extract megatools silently. See http://stackoverflow.com/a/11629736/1748450
26 - 7z x megatools-1.9.94-win64.zip | FIND /V "ing "
27 # copy the qt dlls
28 - copy C:\Qt\5.4\msvc2013_opengl\bin\icudt53.dll build\bin\debug
29 - copy C:\Qt\5.4\msvc2013_opengl\bin\icuin53.dll build\bin\debug
30 - copy C:\Qt\5.4\msvc2013_opengl\bin\icuuc53.dll build\bin\debug
31 - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Cored.dll build\bin\debug
32 - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Guid.dll build\bin\debug
33 - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5OpenGLd.dll build\bin\debug
34 - copy C:\Qt\5.4\msvc2013_opengl\bin\Qt5Widgetsd.dll build\bin\debug
35 # delete build craps
36 - del /F /S /Q /A "build\bin\debug\*.ilk"
37 - del /F /S /Q /A "build\bin\debug\*.pdb"
38 # zip up the build folder -> build.7z
39 - 7z a build .\build\bin\debug\*
40 # rename, upload to Mega
41 - cd megatools-1.9.94-win64
42 - node ..\upload_to_mega.js
43
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 @@
1var util = require('util');
2var exec = require('child_process').exec;
3
4var email = 'chin.bimbo@gmail.com';
5var password = process.env.MEGA_PASSWORD;
6var sourceFileName = 'build.7z';
7var dstFileName = process.env.APPVEYOR_REPO_COMMIT.substring(0, 8) + " - " +
8 process.env.APPVEYOR_REPO_COMMIT_MESSAGE.substring(0, 100) + ".7z";
9
10var cmd = util.format('megaput ../%s --path \"/Root/Citra/Windows/%s\" --username=%s --password=%s --no-progress',
11 sourceFileName,
12 dstFileName,
13 email,
14 password);
15
16if (process.env.APPVEYOR_REPO_BRANCH == "master") {
17 console.log("Uploading file " + dstFileName + " to Mega...");
18 exec(cmd, function(error, stdout, stderr) {
19 console.log('stdout: ' + stdout);
20 console.log('stderr: ' + stderr);
21 if (error !== null) {
22 console.log('exec error: ' + error);
23 }
24 });
25}