Skip to content

Commit

Permalink
feat(AWS Deploy): Remove deploy -f deprecation
Browse files Browse the repository at this point in the history
It'll be re-added in context of v3, with more hacky approach to `deploy -f` support
  • Loading branch information
medikoo committed Oct 7, 2021
1 parent a9bf916 commit 1084251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/deprecations.md
Expand Up @@ -66,6 +66,8 @@ Starting with `v3.0.0`, it will not be possible to disable default export names

Deprecation code: `CLI_DEPLOY_FUNCTION_OPTION'`

_Note: We've resigned from this deprecation in the context of v2 (it'll be re-added in the context of v3). We continue to advise using `deploy function -f` command instead of `deploy -f`._

Starting with `v3.0.0`, `--function` or `-f` option for `deploy` command will be removed. In order to deploy a single function, please use `deploy function` command instead.

<a name="CHANGE_OF_DEFAULT_RUNTIME_TO_NODEJS14X"><div>&nbsp;</div></a>
Expand Down
11 changes: 0 additions & 11 deletions lib/plugins/deploy.js
Expand Up @@ -29,17 +29,6 @@ class Deploy {
};

this.hooks = {
'initialize': () => {
const isDeployCommand =
this.serverless.processedInput.commands.length === 1 &&
this.serverless.processedInput.commands[0] === 'deploy';
if (isDeployCommand && this.options.function) {
this.serverless._logDeprecation(
'CLI_DEPLOY_FUNCTION_OPTION',
'Starting with v3.0.0, `--function` or `-f` option for `deploy` command will be removed. In order to deploy a single function, please use `deploy function` command instead.'
);
}
},
'before:deploy:deploy': async () => {
const provider = this.serverless.service.provider.name;
if (!this.serverless.getProvider(provider)) {
Expand Down

0 comments on commit 1084251

Please sign in to comment.