Change deploy:function hook behavior

This commit is contained in:
Rafal Wilinski 2017-09-07 17:26:42 +02:00
parent ee4123436f
commit 86b8ef729c

View File

@ -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')),
};
}