From 1f124708a043fece1539a716b76022cca0522921 Mon Sep 17 00:00:00 2001 From: proller Date: Thu, 20 Apr 2017 15:42:18 +0300 Subject: [PATCH] Release: Fix version in git describe --- release_lib.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/release_lib.sh b/release_lib.sh index 914298c745b..adf6e5bf2fd 100644 --- a/release_lib.sh +++ b/release_lib.sh @@ -44,14 +44,9 @@ function gen_revision_author { auto_message="Auto version update to" git_log_grep=`git log --oneline --max-count=1 | grep "$auto_message"` if [ "$git_log_grep" == "" ]; then - - git_describe=`git describe` - sed -i -- "s/VERSION_REVISION .*)/VERSION_REVISION $REVISION)/g;s/VERSION_DESCRIBE .*)/VERSION_DESCRIBE $git_describe)/g" dbms/cmake/version.cmake - git commit -m "$auto_message [$REVISION]" dbms/cmake/version.cmake - #git push - tag="$VERSION_PREFIX$REVISION$VERSION_POSTFIX" + # First tag for correct git describe echo -e "\nTrying to create tag: $tag" if git tag -a "$tag" -m "$tag" then @@ -65,6 +60,15 @@ function gen_revision_author { fi fi + git_describe=`git describe` + sed -i -- "s/VERSION_REVISION .*)/VERSION_REVISION $REVISION)/g;s/VERSION_DESCRIBE .*)/VERSION_DESCRIBE $git_describe)/g" dbms/cmake/version.cmake + git commit -m "$auto_message [$REVISION]" dbms/cmake/version.cmake + #git push + + # Second tag for correct version information in version.cmake inside tag + git tag --force -a "$tag" -m "$tag" + git push --force origin "$tag" + else REVISION=$(get_revision) echo reusing old version $REVISION