2 ms·
Using a header isn't quite right. Just implement an URL on your app at /_revision that grabs the HEAD commit. Then write a git-diff-prod command like this: #
by bradgessler 16y ago
Using a header isn't quite right. Just implement an URL on your app at /_revision that grabs the HEAD commit. Then write a git-diff-prod command like this:
#!/bin/sh
git-diff `curl -s "http://www.yourapp.com/_revision"`
Get your paths squared away, chmod +x it, then type in:
git diff-prod
And boom! Instant diff with head in production.
Of course, you might want to get your deploy scripts squared away for figure out why your servers aren't restarting if thats the reason for this.
- andrewvc 16y agoYeah, that was the original reason I implemented it (since fixed), but I just found having it live was too useful to take away.