Skip to content

Commit

Permalink
refactor(CLI): Expose dashboard provider name when starting deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Nov 10, 2021
1 parent 0746bf9 commit 6698fa6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/plugins/aws/deploy/index.js
@@ -1,5 +1,6 @@
'use strict';

const _ = require('lodash');
const writeServiceOutputs = require('../../../cli/write-service-outputs');
const extendedValidate = require('./lib/extendedValidate');
const setBucketName = require('../lib/setBucketName');
Expand Down Expand Up @@ -73,11 +74,19 @@ class AwsDeploy {
'initialize': () => {
const isDeployCommand = this.serverless.processedInput.commands.join(' ') === 'deploy';
if (isDeployCommand && !this.options.function) {
const dashboardProviderName = _.get(
this.provider.cachedCredentials,
'dashboardProviderAlias'
);
log.notice();
log.notice(
`Deploying ${this.serverless.service.service} to stage ${this.serverless
.getProvider('aws')
.getStage()} ${style.aside(`(${this.serverless.getProvider('aws').getRegion()})`)}`
.getStage()} ${style.aside(
`(${this.serverless.getProvider('aws').getRegion()}${
dashboardProviderName ? `, "${dashboardProviderName}" provider` : ''
})`
)}`
);
log.info(); // Ensure gap between verbose logging

Expand Down

0 comments on commit 6698fa6

Please sign in to comment.