Output Git commit hash to file

echo -n "<?php return '" > version; git log --pretty=format:'%h' -n 1 >> version; echo "';" >> version;

Leave a Reply