git commit SHA hash in environment variable in ember-cli

359 Views Asked by At

How to expose the latest git commit SHA hash in an environment variable in config/environment.js in ember-cli

1

There are 1 best solutions below

0
Shiv Kumar Baghel On BEST ANSWER

Found a solution with ember-cli-app-version

https://www.npmjs.com/package/ember-cli-app-version

so will get git hash in {{app-version}} helper. This addon will automatically append SHA to the end of the version.

HTMLBAR template can use like

{{app-version shaOnly=true}} // git SHA