Commit ea226376 authored by Stanley Stuart's avatar Stanley Stuart

upload passing builds to s3

parent 54e7bf00
---
language: node_js
node_js:
- "0.10"
- '0.10'
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) {
// Load grunt-microlib config & tasks
var emberConfig = require('grunt-microlib').init.bind(this)(grunt);
grunt.loadNpmTasks('grunt-microlib');
grunt.loadNpmTasks('grunt-s3');
// Custom phantomjs test task
this.registerTask('test:phantom', "Runs tests through the command line using PhantomJS", [
......@@ -23,12 +24,14 @@ module.exports = function(grunt) {
// Name of the global namespace to export to
namespace: 'RSVP'
},
env: process.env,
pkg: grunt.file.readJSON('package.json'),
mochaTest: require('./options/mocha_test.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
......
// 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
}
};
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