diff --git a/.travis.yml b/.travis.yml index 6843969b..a68a2318 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ language: node_js node_js: - "0.10" sudo: false +after_success: + - "jake ci" notifications: email: - touchdevelop-build@microsoft.com diff --git a/Jakefile b/Jakefile index aaad5f85..9e5b088a 100644 --- a/Jakefile +++ b/Jakefile @@ -264,9 +264,25 @@ task('clean', [], function () { }); task('test', [ 'nodeclient/client.js', 'default' ], { async: true }, function () { - jake.exec([ 'node nodeclient/client.js buildtest' ], {}, function() { complete(); }); + jake.exec([ 'node nodeclient/client.js buildtest' ], + { printStdout: true, printStderr: true }, + function() { complete(); }); }); +task('ci', [], { async : true }, function() { + if (!process.env.TRAVIS) { + console.log("[I] not in travis, skipping upload") + complete(); + } else { + assert(process.env.TRAVIS_BUILD_NUMBER) + assert(process.env.TD_UPLOAD_KEY) + var buildVersion = 80000 + parseInt(process.env.TRAVIS_BUILD_NUMBER); + console.log("[I] uploading v" + buildVersion) + // TODO: upload data + complete(); + } +}) + task('run', [ 'default' ], { async: true }, function (port) { port = port || 80; // XXX fix this too @@ -297,4 +313,3 @@ task('update-docs', [ 'nodeclient/client.js', 'default' ], { async: true }, func function() { complete(); } ) }) - diff --git a/package.json b/package.json index f537f654..9c784aac 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,6 @@ "tsd": "^0.5.7" }, "scripts": { - "test": "jake test" + "test": "jake test --trace" } }