mirror of
https://github.com/mempool/mempool.git
synced 2025-06-11 09:21:15 +02:00
Update frontend git commit hash logic
This commit is contained in:
parent
230fbdbc8e
commit
9c3fc9f75a
@ -51,9 +51,9 @@ if (process.env.DOCKER_COMMIT_HASH) {
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const gitRevParse = spawnSync('git', ['rev-parse', '--short', 'HEAD']);
|
const gitRevParse = spawnSync('git', ['rev-parse', '--short', 'HEAD']);
|
||||||
|
|
||||||
if (!gitRevParse.error) {
|
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}`);
|
console.log(`mempool revision ${gitCommitHash}`);
|
||||||
} else if (gitRevParse.error.code === 'ENOENT') {
|
} else if (gitRevParse.error.code === 'ENOENT') {
|
||||||
console.log('git not found, cannot parse git hash');
|
console.log('git not found, cannot parse git hash');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user