
我正在按照git push
指定的方式部署到 OpenShift。现在,我正在尝试使用 rollbar.com 设置部署通知,但 rollbar 需要 git 修订来记录正在部署的提交。我正在使用 openshift 部署钩子,所以我需要能够从服务器知道 git 修订是什么,但 git 似乎不在服务器上。
答案1
啊,我在搜索时找错了修订版本。原来我可以这样做:
cat ~/git/<app>.git/refs/heads/master
我正在按照git push
指定的方式部署到 OpenShift。现在,我正在尝试使用 rollbar.com 设置部署通知,但 rollbar 需要 git 修订来记录正在部署的提交。我正在使用 openshift 部署钩子,所以我需要能够从服务器知道 git 修订是什么,但 git 似乎不在服务器上。
啊,我在搜索时找错了修订版本。原来我可以这样做:
cat ~/git/<app>.git/refs/heads/master