Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: alexander.turenko@tarantool.org
Cc: tarantool-patches@freelists.org, Kirill Yukhin <kyukhin@tarantool.org>
Subject: [tarantool-patches] [PATCH 2/2] build: set specific name for packages of master branch
Date: Thu, 21 Mar 2019 16:25:44 +0300	[thread overview]
Message-ID: <8650aab92f5973d0546b667fcbf3f0d4b0b82746.1553174240.git.kyukhin@tarantool.org> (raw)
In-Reply-To: <cover.1553174240.git.kyukhin@tarantool.org>

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

  parent reply	other threads:[~2019-03-21 13:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 13:25 [tarantool-patches] [PATCH 0/2] build: update rules for " Kirill Yukhin
2019-03-21 13:25 ` [tarantool-patches] [PATCH 1/2] build: update rules for extended CI Kirill Yukhin
2019-03-22  0:44   ` [tarantool-patches] " Alexander Turenko
2019-03-22  8:41   ` Kirill Yukhin
2019-03-22 11:51     ` Alexander Turenko
2019-03-22 15:22       ` Kirill Yukhin
2019-03-22 15:36         ` Alexander Turenko
2019-03-21 13:25 ` Kirill Yukhin [this message]
2019-03-21 14:09   ` [tarantool-patches] Re: [PATCH 2/2] build: set specific name for packages of master branch Kirill Yukhin
2019-03-21 14:21     ` Konstantin Osipov
2019-03-21 15:20       ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8650aab92f5973d0546b667fcbf3f0d4b0b82746.1553174240.git.kyukhin@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH 2/2] build: set specific name for packages of master branch' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox