Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ENV with git info #12

Open
wireframe opened this issue Nov 17, 2015 · 4 comments
Open

Support for ENV with git info #12

wireframe opened this issue Nov 17, 2015 · 4 comments

Comments

@wireframe
Copy link

When using this package with heroku builds, the .git directory is stripped out from deployments, which means all app versions are reported as something like: 1.0.0+.

Heroku exposes some git metadata to the process ENV which could be used when the .git metadata is not available.
ex:

$ heroku config | egrep heroku
HEROKU_SLUG_COMMIT: 12345678

I'm not necessarily recommending adding this just for heroku (although that would be nice), but I'm sure others have hit similar issue.

@rwjblue
Copy link
Owner

rwjblue commented Nov 20, 2015

Seems like a good idea for fallback if .git is not present.

Is there a documentation page where I can read about which environment variables are present?

@wireframe
Copy link
Author

Yeah, here's a link to the heroku docs.
https://devcenter.heroku.com/changelog-items/630

Looks like they've renamed the variable from HEROKU_SLUG_COMMIT to SOURCE_VERSION.

@rwjblue
Copy link
Owner

rwjblue commented Nov 20, 2015

Awesome. Would love a PR for this if you have time, I'm not sure I'll be able to get to it soon...

@rwjblue
Copy link
Owner

rwjblue commented Jul 26, 2017

Still happy to have help from folks on this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants