Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Use New Relic revision as configuration (#186)
Browse files Browse the repository at this point in the history
This allows you to override revision retrieval for custom builds. This
is useful for builds where the revision is not in the current
directory.
  • Loading branch information
kasperg authored and antonmedv committed Jun 15, 2018
1 parent b52c5f9 commit 2083c29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Added grafana recipe.
- Added yammer recipe, based on Slack recipe.
- Added Google Hangouts Chat recipe, based on Slack recipe.
- Added support for New Relic deployment revision as config.

### Fixed
- Fixed telegram recipe (#170) and updated docs
Expand Down
6 changes: 5 additions & 1 deletion recipe/newrelic.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@
return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"');
});

set('newrelic_revision', function() {
return runLocally('git log -n 1 --format="%h"');
});

desc('Notifying New Relic of deployment');
task('newrelic:notify', function () {
$appId = get('newrelic_app_id');
$apiKey = get('newrelic_api_key');

$data = [
'user' => get('user'),
'revision' => runLocally('git log -n 1 --format="%h"'),
'revision' => get('newrelic_revision'),
'description' => get('newrelic_description'),
];

Expand Down

0 comments on commit 2083c29

Please sign in to comment.