mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-13 18:39:25 -04:00
Simplfying the Git commands in the project file
* Allowing commands to get the `GIT_COMMIT_ID`, `GIT_COMMIT_DATE` and `GIT_BRANCH` to work with spaces in path
This commit is contained in:
@@ -43,9 +43,9 @@ TEMPLATE = app
|
||||
#-----------------------------------------------------------------------------------------------#
|
||||
win32:BUILDDATE = $$system(date /t)
|
||||
unix:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
|
||||
GIT_COMMIT_ID = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse HEAD)
|
||||
GIT_COMMIT_DATE = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ show -s --format=%ci HEAD)
|
||||
GIT_BRANCH = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse --abbrev-ref HEAD)
|
||||
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(git branch --show-current)
|
||||
|
||||
DEFINES += \
|
||||
VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \
|
||||
|
||||
Reference in New Issue
Block a user