From 9bf7f1fa5c4f1b1335728c0a79079f25c711ab61 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 1 Aug 2024 23:55:27 +0200 Subject: [PATCH] Fix git version script trimming wrong command (#1128) --- gui/scripts/gitversion.mjs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gui/scripts/gitversion.mjs b/gui/scripts/gitversion.mjs index 01fdbbaf3f..df71458896 100755 --- a/gui/scripts/gitversion.mjs +++ b/gui/scripts/gitversion.mjs @@ -4,11 +4,9 @@ import { exec as execCallback } from 'node:child_process'; const exec = promisify(execCallback); const [commitHash, versionTag, gitClean] = await Promise.all([ - exec('git rev-parse --verify --short HEAD').then((res) => - res.stdout.trim().substring(1) - ), + exec('git rev-parse --verify --short HEAD').then((res) => res.stdout.trim()), exec('git --no-pager tag --sort -taggerdate --points-at HEAD').then((res) => - res.stdout.split('\n')[0].trim() + res.stdout.split('\n')[0].trim().substring(1) ), // If not empty then it's not clean exec('git status --porcelain').then((res) => (res.stdout ? false : true)),