mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 20:32:05 +08:00
自动读取分支名
This commit is contained in:
@@ -91,11 +91,12 @@ void Application::setBuildDateTime(const QString &buildDateTime)
|
||||
qDebug() << "Spark Store has been updated!";
|
||||
|
||||
config.setValue("build/version", QString(APP_VERSION));
|
||||
config.setValue("build/branch",QString(APP_BRANCH));
|
||||
config.setValue("build/time", buildDateTime);
|
||||
config.sync();
|
||||
}
|
||||
|
||||
setApplicationVersion(DApplication::buildVersion(QString(APP_VERSION) + "-" + "Reason" + "-" + buildDateTime));
|
||||
setApplicationVersion(DApplication::buildVersion(QString(APP_VERSION) + "-" + QString(APP_BRANCH) + "-" + buildDateTime));
|
||||
}
|
||||
|
||||
void Application::setMainWindow(MainWindow *window)
|
||||
|
||||
@@ -26,7 +26,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
VERSION = $$BUILD_VERSION
|
||||
isEmpty(VERSION): VERSION = 4.0.0
|
||||
DEFINES += APP_VERSION=\\\"'$${VERSION}'\\\"
|
||||
|
||||
DEFINES += APP_BRANCH=\\\"'$$system(git symbolic-ref --short -q HEAD)'\\\"
|
||||
# Disable qWarning / qDebug output in Release
|
||||
#CONFIG(release, debug | release): DEFINES += QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user