Creating a WordPress plugin that will retrieve the commit info from select plugins and themes for development purposes. The goal is to have that info be copied to the clipboard once a button is clicked from the admin toolbar.
The issue I am having is grabbing the git info. I have tried getting data with exec('git rev-parse --short HEAD')
but have not had any luck. Of course running git rev-parse --short HEAD
from within the plugin will only show that plugins info.
Am I going about this wrong? Thanks in advanced.
As shown in this build script, you need to make sure you are in the right folder: