Merge pull request #82 from xiaoyifang/feature/add-date

add date to version
This commit is contained in:
xiaoyifang 2022-06-01 07:22:41 +08:00 committed by GitHub
commit 297aaa2435
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,17 @@ system(git describe --tags --always --dirty): hasGit=1
!isEmpty(hasGit){ !isEmpty(hasGit){
GIT_HASH=$$system(git rev-parse --short=8 HEAD ) GIT_HASH=$$system(git rev-parse --short=8 HEAD )
} }
system(echo $${VERSION}.$${GIT_HASH} > version.txt)
win32{
# date /T output is locale aware.
DD=$$system(date /T)
DATE =$$replace(DD, / , )
}
else{
DATE=$$system(date '+%y%m%d')
}
system(echo $${VERSION}.$${GIT_HASH} on $${DATE} > version.txt)
# DEPENDPATH += . generators # DEPENDPATH += . generators
INCLUDEPATH += . INCLUDEPATH += .