mirror of
https://github.com/mempool/mempool.git
synced 2025-02-22 06:21:46 +01:00
Update frontend git commit hash logic
This commit is contained in:
parent
230fbdbc8e
commit
9c3fc9f75a
1 changed files with 2 additions and 2 deletions
|
@ -51,9 +51,9 @@ if (process.env.DOCKER_COMMIT_HASH) {
|
|||
} else {
|
||||
try {
|
||||
const gitRevParse = spawnSync('git', ['rev-parse', '--short', 'HEAD']);
|
||||
|
||||
if (!gitRevParse.error) {
|
||||
gitCommitHash = gitRevParse.stdout.toString('utf-8').replace(/[\n\r\s]+$/, '');
|
||||
const output = gitRevParse.stdout.toString('utf-8').replace(/[\n\r\s]+$/, '');
|
||||
gitCommitHash = output ? output : '?';
|
||||
console.log(`mempool revision ${gitCommitHash}`);
|
||||
} else if (gitRevParse.error.code === 'ENOENT') {
|
||||
console.log('git not found, cannot parse git hash');
|
||||
|
|
Loading…
Add table
Reference in a new issue