fix: don't mark cross compiled builds as dirty

This commit is contained in:
sam 2024-11-19 15:32:09 +01:00
parent 48a11be7b7
commit b3c541f743
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
2 changed files with 3 additions and 1 deletions

View file

@ -40,5 +40,7 @@ public static class BuildInfo
Version = versionData[0];
if (versionData[1] != "0" || dirty)
Version += $"+{versionData[2]}";
if (dirty)
Version += ".dirty";
}
}

View file

@ -1,4 +1,4 @@
#!/bin/sh
(git rev-parse HEAD &&
git describe --tags --always --long &&
if test -z "$(git ls-files --exclude-standard --modified --deleted --others)"; then echo clean; else echo dirty; fi) > ../.version
if test -z "$(git ls-files --exclude-standard --modified --deleted --others -- '*' '!packages.lock.json')"; then echo clean; else echo dirty; fi) > ../.version