Commit cf50c865 authored by Stefan Penner's avatar Stefan Penner

Merge pull request #94 from fivetanley/s3-builds

upload passing builds to s3
parents 604f068f ea226376
---
language: node_js language: node_js
node_js: node_js:
- "0.10" - '0.10'
before_install: before_install:
- npm install -g grunt-cli - npm install -g grunt-cli
after_success: grunt build s3:dev
env:
global:
- secure: |-
d59CLXVX6GiFNo9z2vzCt/l/3p2/RjvjgYvrE3Tx7Ose6H7BBOuV6fSGOQ2n
MK4RHcA+2TIhNshldeX6ZCXNaRIMY3dixfJBF7eb2N7wDBj2hA17oxvE0MzE
rOWXzvAmxA53/xvr4bShoCbsa06WDGScEkcdJRCnFG+ReAyG/WU=
- secure: |-
mrNGoG5AycW+d5jlghF9PJHQW1ETT9jWI7bGe9QX1QRpoSLkGAvxavrujmhu
UNRP/pe5AJBh3zDED38nD/ZGtrcSYQ5CC6QbFLx5mLtqn7mNTo1m3C5lr+55
Sb6mnyLLz2eoPBUMcXwY1i9Qisy40uhfV9VuD5B/gvVud2+oJWI=
...@@ -2,6 +2,7 @@ module.exports = function(grunt) { ...@@ -2,6 +2,7 @@ module.exports = function(grunt) {
// Load grunt-microlib config & tasks // Load grunt-microlib config & tasks
var emberConfig = require('grunt-microlib').init.bind(this)(grunt); var emberConfig = require('grunt-microlib').init.bind(this)(grunt);
grunt.loadNpmTasks('grunt-microlib'); grunt.loadNpmTasks('grunt-microlib');
grunt.loadNpmTasks('grunt-s3');
// Custom phantomjs test task // Custom phantomjs test task
this.registerTask('test:phantom', "Runs tests through the command line using PhantomJS", [ this.registerTask('test:phantom', "Runs tests through the command line using PhantomJS", [
...@@ -23,12 +24,14 @@ module.exports = function(grunt) { ...@@ -23,12 +24,14 @@ module.exports = function(grunt) {
// Name of the global namespace to export to // Name of the global namespace to export to
namespace: 'RSVP' namespace: 'RSVP'
}, },
env: process.env,
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
mochaTest: require('./options/mocha_test.js'), mochaTest: require('./options/mocha_test.js'),
browserify: require('./options/browserify.js'), browserify: require('./options/browserify.js'),
mocha_phantomjs: require('./options/mocha_phantom.js') mocha_phantomjs: require('./options/mocha_phantom.js'),
s3: require('./options/s3'),
}; };
// Merge config into emberConfig, overwriting existing settings // Merge config into emberConfig, overwriting existing settings
......
// the base for dist files
var baseDistFile = 'dist/rsvp-<%= pkg.version %>.';
var builds = ['amd.', '' /* normal rsvp.js */ ];
var s3Uploads = [];
builds.forEach(function(build){
var srcFile = baseDistFile + build + 'js';
s3Uploads.push({ src: srcFile, dest: 'rsvp-<%= env.TRAVIS_COMMIT %>.' + build + 'js' });
s3Uploads.push({ src: srcFile, dest: 'rsvp-latest.' + build + 'js' });
});
module.exports = {
options: {
bucket: 'rsvpjs-builds',
access: 'public-read'
},
dev: {
upload: s3Uploads
}
};
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
"promises-aplus-tests": "~1.3.1", "promises-aplus-tests": "~1.3.1",
"grunt-browserify": "~1.0.2", "grunt-browserify": "~1.0.2",
"grunt-mocha-phantomjs": "~0.2.8", "grunt-mocha-phantomjs": "~0.2.8",
"grunt-mocha-test": "~0.4.0" "grunt-mocha-test": "~0.4.0",
"grunt-s3": "~0.2.0-alpha.2"
}, },
"scripts": { "scripts": {
"test": "grunt test", "test": "grunt test",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment