From ba651968b566f7ad3bb9cce8428cdb27932f6ece Mon Sep 17 00:00:00 2001 From: Kamil Burzynski Date: Thu, 24 Dec 2015 12:06:14 +0100 Subject: [PATCH] Added support for custom stage deployment descriptions --- lib/actions/EndpointDeploy.js | 8 +++++++- lib/actions/EndpointDeployApiGateway.js | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/actions/EndpointDeploy.js b/lib/actions/EndpointDeploy.js index e8e635f39..edbed10d6 100644 --- a/lib/actions/EndpointDeploy.js +++ b/lib/actions/EndpointDeploy.js @@ -69,6 +69,10 @@ module.exports = function(SPlugin, serverlessPath) { option: 'all', shortcut: 'a', description: 'Optional - Select all Functions in your project for deployment' + }, { + option: 'description', + shortcut: 'd', + description: 'Optional - Provide custom description string for API Gateway stage deployment description' } ], }); @@ -108,6 +112,7 @@ module.exports = function(SPlugin, serverlessPath) { evt.all = evt.all ? true : false; evt.aliasEndpoint = evt.aliasEndpoint ? evt.aliasEndpoint : null; evt.aliasRestApi = evt.aliasRestApi ? evt.aliasRestApi : null; + evt.description = evt.description ? evt.description : null; evt.endpoints = []; evt.deployed = {}; @@ -367,7 +372,8 @@ module.exports = function(SPlugin, serverlessPath) { let newEvent = { stage: evt.stage, - region: regionConfig + region: regionConfig, + description: evt.description }; return _this.S.actions.endpointDeployApiGateway(newEvent); diff --git a/lib/actions/EndpointDeployApiGateway.js b/lib/actions/EndpointDeployApiGateway.js index faa3451e2..f0b3e32e1 100644 --- a/lib/actions/EndpointDeployApiGateway.js +++ b/lib/actions/EndpointDeployApiGateway.js @@ -82,7 +82,7 @@ module.exports = function(SPlugin, serverlessPath) { stageName: evt.stage, /* required */ //cacheClusterEnabled: false, TODO: Implement //cacheClusterSize: '0.5 | 1.6 | 6.1 | 13.5 | 28.4 | 58.2 | 118 | 237', TODO: Implement - description: 'Serverless deployment', + description: evt.description || 'Serverless deployment', stageDescription: evt.stage, variables: { functionAlias: evt.stage