Skip to content

Instantly share code, notes, and snippets.

@matthewbeta
Forked from steveburkett/gist:ace3e61d79e4ebcdf796
Last active August 29, 2015 14:08
Show Gist options
  • Save matthewbeta/9dc4b1704249f636fd88 to your computer and use it in GitHub Desktop.
Save matthewbeta/9dc4b1704249f636fd88 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
var dev = {
deployConfiguration: grunt.file.readYAML("deployment.dev.yml"),
},
prod = {
deployConfiguration: grunt.file.readYAML("deployment.yml");
},
bucket = 'ember-build-dsh';
grunt.initConfig({
autobots: {
distDir: 'dist',
// set up a dev task which uses the dev settings
dev: {
s3: {
accessKeyId: dev.deployConfiguration.s3_access_key_id,
secretAccessKey: dev.deployConfiguration.s3_secret_access_key,
bucket: bucket
},
redis: {
host: dev.deployConfiguration.redis_host,
port: dev.deployConfiguration.redis_port,
password: dev.deployConfiguration.redis_password
}
},
// set up a prod task with prod settings
prod: {
s3: {
accessKeyId: prod.deployConfiguration.s3_access_key_id,
secretAccessKey: prod.deployConfiguration.s3_secret_access_key,
bucket: bucket
},
redis: {
host: prod.deployConfiguration.redis_host,
port: prod.deployConfiguration.redis_port,
password: prod.deployConfiguration.redis_password
}
},
}
});
grunt.loadNpmTasks('grunt-autobots');
grunt.registerTask('default', ['autobots']); //run with grunt (does both)
grunt.registerTask('dev', ['autobots:dev']); //run with grunt dev (runs the dev task)
grunt.registerTask('prod', ['autobots:prod']);; // run with grunt prod (runs the prod task)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment