Issue
I was working on a project where QAs report bugs that already fixed. So many time, it turn out that QAs don’t have our latest code.
Solution
Now, I’m thinking to grab the current commit and display it in the console
or on other page for references between us QA, and Developers.
Tried
In CLI, to get the latest commit, I just to do this
git rev-parse --verify HEAD
I’ve tried create a PHP function, and call it.
public function info(){
return str_replace('
','', json_encode(shell_exec('git rev-parse --verify HEAD')));
}
Result
It works fine on my Mac, but on my QA set up, they got null
.
Questions
What did I do wrong ?
Is there another way to do this ?
I’m open to any suggestions at the moment. :)