From 86b8ef729c2836d035b64ef22b43db7f2fa84b83 Mon Sep 17 00:00:00 2001 From: Rafal Wilinski Date: Thu, 7 Sep 2017 17:26:42 +0200 Subject: [PATCH] Change deploy:function hook behavior --- lib/plugins/aws/deployFunction/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/aws/deployFunction/index.js b/lib/plugins/aws/deployFunction/index.js index 96f39e024..a6f3ec1b9 100644 --- a/lib/plugins/aws/deployFunction/index.js +++ b/lib/plugins/aws/deployFunction/index.js @@ -32,12 +32,12 @@ class AwsDeployFunction { .spawn('package:function'), 'deploy:function:deploy': () => BbPromise.bind(this) - .then(this.deployFunction) .then(() => { - if (this.options['update-config']) { - this.updateFunctionConfiguration(); + if (!this.options['update-config']) { + this.deployFunction(); } }) + .then(this.updateFunctionConfiguration) .then(() => this.serverless.pluginManager.spawn('aws:common:cleanupTempDir')), }; }