Skip to content

Commit ed1b2df

Browse files
committed
app-version: Use SOURCE_VERSION env var if available
1 parent 05237c2 commit ed1b2df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/environment.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ module.exports = function(environment) {
5353

5454
if (environment === 'production') {
5555
// here you can enable a production-specific feature
56+
57+
// Heroku Git Hash support
58+
if (process.env.SOURCE_VERSION) {
59+
let hash = process.env.SOURCE_VERSION.substr(0, 7);
60+
ENV['ember-cli-app-version'] = { version: hash };
61+
}
5662
}
5763

5864
return ENV;

0 commit comments

Comments
 (0)