It's the same as 'git rev-parse --short HEAD'. AFAIK, it's not documented anywhere, found it just out of curiosity on what ENV's heroku sets for the app.
Someone from Heroku has to confirm this. Like I said, just happened to noticed this, but it seems to correlate with running 'git rev-parse --short HEAD' against my repo after each push. YMMV, K. --- http://blitz.io @pcapr On Sat, Aug 6, 2011 at 6:54 PM, dblock <[email protected]> wrote: > For some reason I thought that was different ... > > Is this documented somewhere on Heroku? > > Forgive my ignorance, is it just the first 7 digits of the commit > hash? Why 7? > > Also, I found this thread > http://groups.google.com/group/heroku/browse_thread/thread/35886af3ee8a87f6 > that wasn't answered and looks worrisome - is this guaranteed to be > what has been pushed? > > Thx > dB. > > On Aug 5, 4:46 pm, kowsik <[email protected]> wrote: >> If you do >> >> $ heroku console 'ENV' >> >> on your app, you'll notice that all heroku apps already have a >> COMMIT_HASH environment variable that's the last git push/commit >> revision. You can simply use this instead of defining your own config >> variable. >> >> K. >> ---http://blitz.io >> @pcapr >> >> >> >> >> >> >> >> On Fri, Aug 5, 2011 at 1:37 PM, dblock <[email protected]> wrote: >> > We use a CDN for our content. Every new push to heroku changes the >> > value of ASSETS_HASH to the git-revision of the latest change. Then >> > the system reads that value to make URLs. >> >> > I don't want to commit a file that contains ASSETS_HASH because that >> > becomes a chicken-egg problem (a hash that represents the ... previous >> > commit, umh...), I am super happy with our heroku config:add >> > ASSETS_HASH=... . But that restarts the server, after which I am >> > pushing the new code, maybe 30 seconds later. >> >> > Is it possible to combine those two? I see two options. >> >> > - git push heroku master +++config:add ASSETS_HASH=... >> > - heroku config:add ASSETS_HASH=... --norestart ; git push heroku >> > master >> >> > Ideas? >> >> > Thx >> > dB. >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "Heroku" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group >> > athttp://groups.google.com/group/heroku?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
