Skip to content

Commit

Permalink
Merge branch 'release/0.2.1' into develop
Browse files Browse the repository at this point in the history
* release/0.2.1:
  Add option to add the gittab to the package version
  Change hakabana version
  • Loading branch information
Pierre-Sylvain Desse committed Sep 24, 2014
2 parents 50205a4 + 77870e7 commit 35b8ec0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,20 @@ add_custom_target(localinstall
# CPack default Packaging
include(version.cmake)

# Add a build tag from the Git information
execute_process(COMMAND git symbolic-ref -q --short HEAD WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE BUILD_BRANCH RESULT_VARIABLE HAD_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
execute_process(COMMAND git describe --dirty --always WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE BUILDTAG RESULT_VARIABLE HAD_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
if(HAD_ERROR EQUAL 0)
set(HAKABANA_VERSION_BUILD "+${BUILDTAG}")
execute_process(COMMAND echo "set(HAKABANA_VERSION_BUILD \"${HAKABANA_VERSION_BUILD}\")"
OUTPUT_FILE ${CMAKE_SOURCE_DIR}/buildtag.cmake)
else()
include(buildtag.cmake OPTIONAL)
set(GITTAG "yes" CACHE STRING "Append git tag to build number")
if(GITTAG STREQUAL "yes")
# Add a build tag from the Git information
execute_process(COMMAND git symbolic-ref -q --short HEAD WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE BUILD_BRANCH RESULT_VARIABLE HAD_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
execute_process(COMMAND git describe --dirty --always WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE BUILDTAG RESULT_VARIABLE HAD_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
if(HAD_ERROR EQUAL 0)
set(HAKABANA_VERSION_BUILD "+${BUILDTAG}")
execute_process(COMMAND echo "set(HAKABANA_VERSION_BUILD \"${HAKABANA_VERSION_BUILD}\")"
OUTPUT_FILE ${CMAKE_SOURCE_DIR}/buildtag.cmake)
else()
include(buildtag.cmake OPTIONAL)
endif()
endif()

set(CPACK_GENERATOR "TGZ")
Expand Down
2 changes: 1 addition & 1 deletion version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

set(HAKABANA_VERSION_MAJOR 0)
set(HAKABANA_VERSION_MINOR 2)
set(HAKABANA_VERSION_PATCH 0)
set(HAKABANA_VERSION_PATCH 1)

0 comments on commit 35b8ec0

Please sign in to comment.