Skip to content

Commit

Permalink
Fix BUILD_DATE for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-xo authored and KjellMorgenstern committed Feb 7, 2020
1 parent e1891a2 commit 3d61c58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pri/gitversion.pri
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ GIT_DATE = $$system($$BASE_GIT_COMMAND show --no-patch --no-notes --pretty='%cd'
win32 {
# Try to squeeze something ISO-8601-ish out of windows
BUILD_DATE = $$system( powershell (Get-Date -Format "o") )
} else {
}

macx {
# MacOS uses BSD date rather than GNU date.
BUILD_DATE = $$system( date +%Y-%m-%dT%H:%M:%S%z )
}

!win32:!macx {
BUILD_DATE = $$system( date --iso-8601=seconds )
}

Expand Down

0 comments on commit 3d61c58

Please sign in to comment.