Commit aa174950 authored by Jason Rhinelander's avatar Jason Rhinelander

Use + in package version if current version tagged

Commits beyond a tagged version are post-release versions, so should be
a.b.c+git... instead of a.b.c~git... (since the latter sorts before
a.b.c and the former after a.b.c)
parent d9c70820
......@@ -25,8 +25,20 @@ if(NOT "@CMAKE_BUILD_TYPE@" STREQUAL "Release")
message(FATAL_ERROR "Unable to determine commit date for non-Release build")
string(REGEX REPLACE "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9]).*" "\\1\\2\\3" eris_build_datestr "${eris_build_date}")
execute_process(COMMAND git tag -l "v@ERIS_VERSION@"
RESULT_VARIABLE eris_git_tagged_result
OUTPUT_VARIABLE eris_git_tagged
if(NOT eris_git_rev_result EQUAL 0)
message(FATAL_ERROR "Unable to run git tag to determine pre/post-release build status")
set(gitversep "~")
if (eris_git_tagged)
set(gitversep "+")
set(eris_package_version "${eris_package_version}~git${eris_build_datestr}~${eris_git_rev}")
set(eris_package_version "${eris_package_version}${gitversep}git${eris_build_datestr}.${eris_git_rev}")
set(CPACK_PACKAGE_FILE_NAME "eris_${eris_package_version}_@arch@")
set(CPACK_DEBIAN_PACKAGE_VERSION "${eris_package_version}")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment