From 474d1a8d94a5fbd50acb18dc8b24bd0bbf86db7e Mon Sep 17 00:00:00 2001 From: Luke Melia Date: Mon, 27 Jul 2015 13:53:05 -0400 Subject: [PATCH] Update for cli API changes --- .../files/config/deploy.js | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/blueprints/lightning-deploy-config/files/config/deploy.js b/blueprints/lightning-deploy-config/files/config/deploy.js index 209c352..0ae9d3d 100644 --- a/blueprints/lightning-deploy-config/files/config/deploy.js +++ b/blueprints/lightning-deploy-config/files/config/deploy.js @@ -1,10 +1,10 @@ -var VALID_DEPLOY_ENVIRONMENTS = [ //update these to match what you call your deployment environments +var VALID_DEPLOY_TARGETS = [ //update these to match what you call your deployment targets 'dev', 'qa', 'prod' ]; -module.exports = function(environment) { +module.exports = function(deployTarget) { var ENV = { build: {}, redis: { @@ -15,28 +15,28 @@ module.exports = function(environment) { prefix: '<%= dasherizedPackageName %>' } }; - if (VALID_DEPLOY_ENVIRONMENTS.indexOf(environment) === -1) { - throw new Error('Invalid environment ' + environment); + if (VALID_DEPLOY_TARGETS.indexOf(deployTarget) === -1) { + throw new Error('Invalid deployTarget ' + deployTarget); } - if (environment === 'dev') { + if (deployTarget === 'dev') { ENV.build.environment = 'development'; ENV.redis.url = process.env.REDIS_URL || 'redis://0.0.0.0:6379/'; ENV.plugins = ['build', 'redis']; // only care about deploying index.html into redis in dev } - if (environment === 'qa' || environment === 'prod') { + if (deployTarget === 'qa' || deployTarget === 'prod') { ENV.build.environment = 'production'; ENV.s3.accessKeyId = process.env.AWS_KEY; ENV.s3.secretAccessKey = process.env.AWS_SECRET; ENV.s3.bucket = /* YOUR S3 BUCKET NAME */; } - if (environment === 'qa') { + if (deployTarget === 'qa') { ENV.redis.url = process.env.QA_REDIS_URL; } - if (environment === 'prod') { + if (deployTarget === 'prod') { ENV.redis.url = process.env.PROD_REDIS_URL; } @@ -49,7 +49,7 @@ module.exports = function(environment) { * var Promise = require('ember-cli/lib/ext/promise'); * return new Promise(function(resolve, reject){ * var exec = require('child_process').exec; - * var command = 'heroku config:get REDISTOGO_URL --app my-app-' + environment; + * var command = 'heroku config:get REDISTOGO_URL --app my-app-' + deployTarget; * exec(command, function (error, stdout, stderr) { * ENV.redis.url = stdout.replace(/\n/, '').replace(/\/\/redistogo:/, '//:'); * if (error) { diff --git a/package.json b/package.json index 0eeb1d8..7fdfae3 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "ember-cli-deploy-build": "zapnito/ember-cli-deploy-build#4092f0aba15d7706ad44dfaeac6f574c6b19511c", "ember-cli-deploy-gzip": "lukemelia/ember-cli-deploy-gzip#b618036a4502a897deed9612a653f1b5f032e915", - "ember-cli-deploy-redis": "zapnito/ember-cli-deploy-redis#432de031b6faa5d98b3c4fa897d2291faf27a545", + "ember-cli-deploy-redis": "zapnito/ember-cli-deploy-redis#092c1164163168415b21a8e6286dbfd5d0fa78b8", "ember-cli-deploy-s3": "zapnito/ember-cli-deploy-s3#076f35e7b53d1afa4672e6054fdd76ceda1fa948", "ember-cli-deploy-manifest": "lukemelia/ember-cli-deploy-manifest#ca346b136001f98e04a5a135dd87157f1b297c81", "ember-cli-deploy-revision-key": "zapnito/ember-cli-deploy-revision-key#972c9d1a74095d7f664ab0f92bc632155541aaa5"