Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created August 23, 2016 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abuiles/c1a993f384b046ee27c8a41b24f259aa to your computer and use it in GitHub Desktop.
Save abuiles/c1a993f384b046ee27c8a41b24f259aa to your computer and use it in GitHub Desktop.
/* jshint node: true */
require('dotenv').config({ silent: true });
module.exports = function(deployTarget) {
var ENV = {
build: {}
};
/*
This tells ember-cli-deploy-s3-index how to name the index file.
We end with files like: index.html:revision
*/
ENV['revision-data'] = {
type: 'git-commit'
};
ENV.build.environment = deployTarget;
/*
This is used by ember-cli-deploy-s3 to upload all the assets.
*/
ENV.s3 = {
accessKeyId: process.env.S3_AWS_ACCESS_KEY,
secretAccessKey: process.env.S3_AWS_SECRET_ACCESS_KEY,
exclude: ['.DS_Store', '*-test.js', 'index.html', '*.map', '.gitkeep'],
region: 'us-east-1',
bucket: process.env.S3_BUCKET
};
/*
This tells ember-cli-deploy-s3-index where to upload the index.
*/
ENV['s3-index'] = {
accessKeyId: process.env.S3_AWS_ACCESS_KEY,
secretAccessKey: process.env.S3_AWS_SECRET_ACCESS_KEY,
acl: 'public-read',
region: 'us-east-1',
bucket: process.env.S3_BUCKET,
hostName: process.env.S3_BUCKET
};
return ENV;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment