Skip to content

Commit

Permalink
Fix git version script trimming wrong command (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX authored Aug 1, 2024
1 parent 4abd171 commit 9bf7f1f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gui/scripts/gitversion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 9bf7f1f

Please sign in to comment.