[tarantool-patches] Re: [PATCH 2/2] build: set specific name for packages of master branch

Kirill Yukhin kyukhin at tarantool.org
Thu Mar 21 17:09:55 MSK 2019


Hello,

We need to update a test as well. Branch force-pushed.

On 21 Mar 16:25, Kirill Yukhin wrote:
> To make Linux package managers happy, set major version
> number for master branch to 9999, so it will be always
> freshest one.
> ---
>  CMakeLists.txt | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 7658fc6..dbe5847 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -171,8 +171,16 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git" AND GIT)
>          OUTPUT_STRIP_TRAILING_WHITESPACE
>          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
>  
> +    execute_process (COMMAND ${GIT} rev-parse --abbrev-ref HEAD
> +        OUTPUT_VARIABLE TARANTOOL_GIT_BRANCH
> +        OUTPUT_STRIP_TRAILING_WHITESPACE
> +        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
>      if (NOT ("${TARANTOOL_GIT_VERSION}" STREQUAL "${TARANTOOL_VERSION}"))
> -        set(TARANTOOL_VERSION "${TARANTOOL_GIT_VERSION}")
> +        if ("${TARANTOOL_GIT_BRANCH}" STREQUAL "master")
> +            set (TARANTOOL_VERSION "9999.${TARANTOOL_GIT_VERSION}")
> +        else()
> +            set(TARANTOOL_VERSION "${TARANTOOL_GIT_VERSION}")
> +        endif()
>          message(STATUS "Generating VERSION file")
>          file(WRITE ${VERSION_FILE} "${TARANTOOL_VERSION}\n")
>  
> -- 
> 2.19.1
> 
diff --git a/test/box-py/args.result b/test/box-py/args.result
index 54629ed..426d67b 100644
--- a/test/box-py/args.result
+++ b/test/box-py/args.result
@@ -44,7 +44,7 @@ tarantool --no-such-option --version
 tarantool: unrecognized option
 
 tarantool --version
-Tarantool 2.minor.patch-<rev>-<commit>
+Tarantool 9999.minor.patch-<rev>-<commit>
 Target: platform <build>
 Build options: flags
 Compiler: cc
@@ -52,7 +52,7 @@ C_FLAGS: flags
 CXX_FLAGS: flags
 
 tarantool -v
-Tarantool 2.minor.patch-<rev>-<commit>
+Tarantool 9999.minor.patch-<rev>-<commit>
 Target: platform <build>
 Build options: flags
 Compiler: cc
@@ -60,7 +60,7 @@ C_FLAGS: flags
 CXX_FLAGS: flags
 
 tarantool -V
-Tarantool 2.minor.patch-<rev>-<commit>
+Tarantool 9999.minor.patch-<rev>-<commit>
 Target: platform <build>
 Build options: flags
 Compiler: cc
@@ -111,7 +111,7 @@ arg[3] => 2
 arg[4] => 3
 
 tarantool -V ${SOURCEDIR}/test/box-py/args.lua 1 2 3
-Tarantool 2.minor.patch-<rev>-<commit>
+Tarantool 9999.minor.patch-<rev>-<commit>
 Target: platform <build>
 Build options: flags
 Compiler: cc

--
Regards, Kirill Yukhin




More information about the Tarantool-patches mailing list