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

Commit 2083c29

Browse files
kaspergantonmedv
authored andcommitted
Use New Relic revision as configuration (#186)
This allows you to override revision retrieval for custom builds. This is useful for builds where the revision is not in the current directory.
1 parent b52c5f9 commit 2083c29

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Added grafana recipe.
88
- Added yammer recipe, based on Slack recipe.
99
- Added Google Hangouts Chat recipe, based on Slack recipe.
10+
- Added support for New Relic deployment revision as config.
1011

1112
### Fixed
1213
- Fixed telegram recipe (#170) and updated docs

recipe/newrelic.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@
1717
return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"');
1818
});
1919

20+
set('newrelic_revision', function() {
21+
return runLocally('git log -n 1 --format="%h"');
22+
});
23+
2024
desc('Notifying New Relic of deployment');
2125
task('newrelic:notify', function () {
2226
$appId = get('newrelic_app_id');
2327
$apiKey = get('newrelic_api_key');
2428

2529
$data = [
2630
'user' => get('user'),
27-
'revision' => runLocally('git log -n 1 --format="%h"'),
31+
'revision' => get('newrelic_revision'),
2832
'description' => get('newrelic_description'),
2933
];
3034

0 commit comments

Comments
 (0)