---
scripts/config_def.mk | 1 +
scripts/make_version.sh | 8 --------
scripts/rules.mk | 4 +++-
3 files changed, 4 insertions(+), 9 deletions(-)
delete mode 100755 scripts/make_version.sh
diff --git a/scripts/config_def.mk b/scripts/config_def.mk
index 5de0c05..0316a9f 100644
--- a/scripts/config_def.mk
+++ b/scripts/config_def.mk
@@ -2,6 +2,7 @@ CC ?= gcc
RAGEL ?= ragel
DOT ?= dot
CONFETTI ?= confetti
+GIT ?= git
HAVE_GIT ?= 1
diff --git a/scripts/make_version.sh b/scripts/make_version.sh
deleted file mode 100755
index ba26840..0000000
--- a/scripts/make_version.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-echo -n 'const char tarantool_version_string[] = "'
-git tag | tail -n 1 | tr -d \\n
-echo -n " +"$(git log --oneline $(git tag | tail -n1)..HEAD | wc -l)"commits "
-git log -1 --format='%h' | tr -d \\n
-git diff --quiet || (echo -n ' AND'; git diff --shortstat) | tr -d \\n
-echo '";'
diff --git a/scripts/rules.mk b/scripts/rules.mk
index 26d7d93..0659e1c 100644
--- a/scripts/rules.mk
+++ b/scripts/rules.mk
@@ -99,7 +99,9 @@ endif
ifeq ($(HAVE_GIT),1)
tarantool_version.h: FORCE
- @$(SRCDIR)/scripts/make_version.sh > $...@_
+ @echo -n 'const char tarantool_version_string[] = "' > $...@_
+ @$(GIT) describe HEAD | tr -d \\n >> $...@_
+ @echo '";' >> $...@_
@diff -q $@ $...@_ 2>/dev/null >/dev/null || ($(ECHO) " GEN "
$(notdir $@); cp $...@_ $@)
FORCE:
endif
--
1.7.3.2
_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help : https://help.launchpad.net/ListHelp