mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 12:06:37 -04:00
Try to fix git-get-branch.sh call on Windows
This commit is contained in:
@@ -73,7 +73,13 @@ freebsd:BUILDDATE = $$system(date -j -R -r "${SOURCE_DATE_EPOCH:-$(date +%
|
||||
macx:BUILDDATE = $$system(date -j -R -r "${SOURCE_DATE_EPOCH:-$(date +%s)}")
|
||||
GIT_COMMIT_ID = $$system(git log -n 1 --pretty=format:"%H")
|
||||
GIT_COMMIT_DATE = $$system(git log -n 1 --pretty=format:"%ci")
|
||||
GIT_BRANCH = $$system(scripts/git-get-branch.sh)
|
||||
|
||||
unix {
|
||||
GIT_BRANCH = $$system(sh scripts/git-get-branch.sh)
|
||||
}
|
||||
else {
|
||||
GIT_BRANCH = $$system(pwsh scripts/git-get-branch.ps1)
|
||||
}
|
||||
|
||||
message("GIT_BRANCH: "$$GIT_BRANCH)
|
||||
DEFINES += \
|
||||
|
||||
2
scripts/git-get-branch.ps1
Normal file
2
scripts/git-get-branch.ps1
Normal file
@@ -0,0 +1,2 @@
|
||||
$HASH = git log --pretty=%h -1
|
||||
git show-ref | select-string $HASH | select-string -NotMatch HEAD | foreach {$_ -replace '.*/(.*)','$1'}
|
||||
Reference in New Issue
Block a user