Use explicit git hash length in version string (#30318)

This avoids potential differences between Git versions.

Having a guarantee unique hash isn't neccessary as it's just
informational and we have the date in the version string as well.
This commit is contained in:
Jan Kassens
2024-07-11 13:58:11 -04:00
committed by GitHub
parent a09950ed41
commit d09484c4aa

View File

@@ -19,9 +19,7 @@ const {
// Runs the build script for both stable and experimental release channels,
// by configuring an environment variable.
const sha = String(
spawnSync('git', ['show', '-s', '--no-show-signature', '--format=%h']).stdout
).trim();
const sha = String(spawnSync('git', ['rev-parse', 'HEAD']).stdout).slice(0, 8);
let dateString = String(
spawnSync('git', [