I have this strange situation where git describe --always (as invoked by git-describe from npm) returns 8 instead of 7 characters.
The issue appears to be dependent on the machine, it's not consistent but happens sometimes:
Machine 1:
agross@gh-runner-1 $ git describe --always
384f5105
agross@gh-runner-1 $ git rev-list --count HEAD
1
Machines 2:
agross@gh-runner-2 $ git describe --always
384f510
agross@gh-runner-2 $ git rev-list --count HEAD
1
I can get the has down to 7 chars by passing --abbrev-7. It seems as if git-describe (from npm) supports that flag:
const gitInfo = gitDescribeSync({ customArguments: ['--abbrev=7'] });
It would be very beneficial for this situation to hard-code the hash to 7 characters.