File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.11.4) # for RHEL 8
22
33project (
44 linyaps-box
5- VERSION 2.0.0
5+ VERSION 2.0.3
66 DESCRIPTION "A simple OCI runtime for desktop applications"
77 HOMEPAGE_URL "https://github.com/OpenAtom-Linyaps/linyaps-box"
88 LANGUAGES CXX )
@@ -39,6 +39,8 @@ option(linyaps-box_ENABLE_UNIT_TESTS "Enable unit tests."
3939
4040option (linyaps-box_ENABLE_SMOKE_TESTS "Enable smoke tests." OFF )
4141
42+ option (linyaps-box_MAKE_RELEASE "Make release build." OFF )
43+
4244if (linyaps-box_ENABLE_SMOKE_TESTS OR linyaps-box_ENABLE_UNIT_TESTS)
4345 set (linyaps-box_ENABLE_TESTING ON )
4446endif ()
@@ -185,6 +187,20 @@ set(linyaps-box_LIBRARY_SOURCE
185187 src/linyaps_box/utils/touch.h)
186188
187189set (LINYAPS_BOX_VERSION ${PROJECT_VERSION} )
190+
191+ if (NOT linyaps-box_MAKE_RELEASE)
192+ message (STATUS "make dev build" )
193+
194+ execute_process (
195+ COMMAND git rev-parse --short=7 HEAD
196+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
197+ OUTPUT_VARIABLE GIT_COMMIT_HASH
198+ OUTPUT_STRIP_TRAILING_WHITESPACE
199+ )
200+
201+ set (LINYAPS_BOX_VERSION "${LINYAPS_BOX_VERSION} -dev-${GIT_COMMIT_HASH} " )
202+ endif ()
203+
188204configure_file (${CMAKE_CURRENT_SOURCE_DIR} /src/linyaps_box/version.h.in
189205 ${CMAKE_CURRENT_BINARY_DIR} /src/linyaps_box/version.h @ONLY )
190206
You can’t perform that action at this time.
0 commit comments