I'm following the approach mentioned on https://stackoverflow.com/a/59951577/21503085
When I run my application locally, it works OK.
However, when the build is run with vue-cli-service build in our Jenkins CI/CD process then the commit hash is not picked up.
To help debug, I logged the output from gitDescribeSync() call:
{"dirty":false,"raw":"","hash":"","distance":null,"tag":null,"semver":null,"suffix":"","semverString":null}
I tried variations like gitDescribeSync(__dirname) and gitDescribeSync(__dirname, { match: '[0-9]*' }) without success.
I assume this is not a bug in this project, more something to do with how vue-cli-service works, but hoping someone can give some help/guidance how to make it work.