Skip to content

Commit

Permalink
Merge pull request #1 from FidelLimited/fix-hooks
Browse files Browse the repository at this point in the history
Fix hooks
  • Loading branch information
goncaloneves authored Mar 9, 2017
2 parents fe376ca + 33dc21a commit bc3f948
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ plugins:

#### Function

* **How it works?** When deployment region or stage don't match function regions or stages, that function will be deleted for deployment.
* **How it works?** When deployment region or stage don't match function regions or stages, that function will be deleted from deployment.

* **regions** - Function accepted deployment regions.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-plugin-select",
"version": "1.0.0-rc.1",
"version": "1.0.1-rc.1",
"description": "Serverless plugin that selects which functions are to be deployed.",
"main": "src/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ class Select {

/** Serverless hooks */
this.hooks = {
'before:deploy:function:packageFunction': this.beforeCreateDeploymentArtifacts.bind(this),
'before:deploy:createDeploymentArtifacts': this.beforeCreateDeploymentArtifacts.bind(this)
'after:deploy:initialize': this.deployHook.bind(this),
'before:deploy:function:initialize': this.deployHook.bind(this)
}
}

/**
* @description Before create deployment artifacts
* @description Deploy hook
*
* @fulfil {} — Functions optimized
* @reject {Error} Optimization error
*
* @return {(boolean|Promise)}
* */
beforeCreateDeploymentArtifacts () {
deployHook () {
/** Skip function selection */
if (this.options.noDeploy) {
return false
Expand Down

0 comments on commit bc3f948

Please sign in to comment.