From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A4F9E276E7 for ; Thu, 21 Mar 2019 09:25:53 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ujK0L1LZi1Gi for ; Thu, 21 Mar 2019 09:25:53 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3FFEE26904 for ; Thu, 21 Mar 2019 09:25:53 -0400 (EDT) From: Kirill Yukhin Subject: [tarantool-patches] [PATCH 2/2] build: set specific name for packages of master branch Date: Thu, 21 Mar 2019 16:25:44 +0300 Message-Id: <8650aab92f5973d0546b667fcbf3f0d4b0b82746.1553174240.git.kyukhin@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: alexander.turenko@tarantool.org Cc: tarantool-patches@freelists.org, Kirill Yukhin 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