File tree Expand file tree Collapse file tree 5 files changed +28
-101
lines changed
tools/version_build_tools Expand file tree Collapse file tree 5 files changed +28
-101
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,25 @@ if (NOT EXISTS ${CMAKE_SOURCE_DIR}/QTCMAKE.cfg)
5757endif ()
5858
5959message (STATUS "Generate Version File" )
60- # TODO Do not use python to generate version file.
61- execute_process (COMMAND python ${CMAKE_SOURCE_DIR} /tools/version_build_tools/main.py
62- --type cpp
63- --output ${CMAKE_SOURCE_DIR} /src/common/version .h
60+ set (MajorVersion $ENV{BK_CI_MAJOR_VERSION} 2)
61+ set (MinorVersion $ENV{BK_CI_MINOR_VERSION} 1)
62+ set (FixVersion $ENV{BK_CI_FIX_VERSION} 93)
63+ set (BuildNumber $ENV{BK_CI_BUILD_NO} 0)
64+ if ($ENV{isBetaVersion} MATCHES "false" )
65+ set (UpdateChannel "stable" )
66+ else ()
67+ set (UpdateChannel "beta" )
68+ endif ()
69+ configure_file (${CMAKE_SOURCE_DIR} /tools/version_build_tools/version .h.in
70+ ${CMAKE_SOURCE_DIR} /src/common/version .h
71+ @ONLY
6472)
6573
74+ string (TIMESTAMP BuildTime "%Y-%m-%d %H:%M:%S" )
75+ message (STATUS "Build TIme: ${BuildTime} " )
76+ message (STATUS "Build Version: ${MajorVersion} .${MinorVersion} .${FixVersion} .${BuildNumber} " )
77+ message (STATUS "Update Channel: ${UpdateChannel} " )
78+
6679function (find_include_dirs out)
6780 file (GLOB_RECURSE headers ${ARGN} )
6881 foreach (path ${headers} )
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+
2+ #ifndef COMMON_VERSION_H_
3+ #define COMMON_VERSION_H_
4+
5+ #include <string>
6+
7+ const std ::string AppVersion = "@MajorVersion@.@MinorVersion@.@FixVersion@.@BuildNumber@" ;
8+ const std ::string UpdateChannel = "@UpdateChannel@" ;
9+ const std ::string AEPluginVersion = "@MajorVersion@.@MinorVersion@.@FixVersion@" ;
10+
11+ #endif //COMMON_VERSION_H_
You can’t perform that action at this time.
0 commit comments