Skip to content
Browse files

BuildLight notifier blinks red on build failure.

  • Loading branch information...
1 parent 3f27fe2 commit c1bdc67f2b9a7f6d969b213928957e5c8293c398 @cliffano committed Aug 27, 2013
Showing with 15 additions and 5 deletions.
  1. +1 −1 CHANGELOG.md
  2. +12 −2 lib/notifiers/buildlight.js
  3. +2 −2 package.json
View
2 CHANGELOG.md
@@ -1,5 +1,5 @@
### 0.2.1
-*
+* BuildLight notifier blinks red on build failure
### 0.2.0
* Add l10n support, with en and id locales
View
14 lib/notifiers/buildlight.js
@@ -26,8 +26,18 @@ BuildLight.prototype.notify = function (status) {
},
UNKNOWN = 'blue';
- var buildLight = new _BuildLight(this.opts);
- buildLight[COLOURS[status] || UNKNOWN]();
+ var buildLight = new _BuildLight(this.opts),
+ colour = COLOURS[status];
+
+ if (status === 'FAIL') {
+ buildLight.blink(colour, function (err) {
+ if (err) {
+ console.error(err.message);
+ }
+ });
+ } else {
+ buildLight[colour || UNKNOWN]();
+ }
};
module.exports = BuildLight;
View
4 package.json
@@ -34,7 +34,7 @@
"bagofcli": "~0.0.5",
"bagofrequest": "~0.0.5",
"bagoftext": "~0.0.2",
- "buildlight": "~0.0.2",
+ "buildlight": "~0.0.3",
"colors": "~0.6.2",
"commander": "~2.0.0",
"cron": "~1.0.1",
@@ -59,4 +59,4 @@
"url": "http://github.com/cliffano/nestor/raw/master/LICENSE"
}
]
-}
+}

0 comments on commit c1bdc67

Please sign in to comment.
Something went wrong with that request. Please try again.