Skip to content

Commit

Permalink
1.0.0-rc.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Rabold committed Jul 5, 2017
1 parent 148d5f4 commit 62e4691
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
[![license](https://img.shields.io/github/license/arabold/serverless-sentry-plugin.svg)](https://github.com/arabold/serverless-sentry-plugin/blob/master/LICENSE)
[![dependencies](https://img.shields.io/david/arabold/serverless-sentry-plugin.svg)](https://www.npmjs.com/package/serverless-sentry)

This plugin simplifies automatic forwarding of errors and exceptions to Sentry
(sentry.io) to Serverless 1.x.

## About
This Serverless plugin simplifies integration of Sentry's
Expand Down Expand Up @@ -332,7 +330,12 @@ in the examples above.

## Version History

### 1.0.0-rc.1 [WIP]
### 1.0.0-rc.2

* Fixed an issue with the plugin not being initialized properly when deploying
an existing artifact.

### 1.0.0-rc.1

* First official release of this plugin for use with Serverless 1.x
* For older versions of this plugin that work with Serverless 0.5, see
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-sentry",
"version": "1.0.0-rc.1",
"version": "1.0.0-rc.2",
"description": "Serverless Sentry Plugin - Automatically send errors and exceptions to Sentry (https://sentry.io)",
"main": "src/index.js",
"author": "Andre Rabold",
Expand Down
14 changes: 12 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class Sentry {
this.hooks = {
"before:package:initialize": this.beforePackageInitialize.bind(this),
"after:package:initialize": this.afterPackageInitialize.bind(this),
"after:deploy:deploy": this.afterDeployFunctions.bind(this)
"before:deploy:deploy": this.beforeDeployDeploy.bind(this),
"after:deploy:deploy": this.afterDeployDeploy.bind(this)
};

this.configPlugin();
Expand All @@ -34,6 +35,10 @@ class Sentry {
}

validate() {
if (this._validated) {
// Already ran
return BbPromise.resolve();
}

// Check required serverless version
if (SemVer.gt("1.12.0", this._serverless.getVersion())) {
Expand Down Expand Up @@ -78,7 +83,12 @@ class Sentry {
.then(this.instrumentFunctions);
}

afterDeployFunctions() {
beforeDeployDeploy() {
return BbPromise.bind(this)
.then(this.validate);
}

afterDeployDeploy() {
return BbPromise.bind(this)
.then(this.createSentryRelease)
.then(this.deploySentryRelease);
Expand Down

0 comments on commit 62e4691

Please sign in to comment.