[Asterisk-code-review] build tools: fix post build stage failure due to invalid dirty (repotools[master])

Scott Griepentrog asteriskteam at digium.com
Mon Oct 31 13:02:05 CDT 2016


Scott Griepentrog has uploaded a new change for review. ( https://gerrit.asterisk.org/4241 )

Change subject: build_tools: fix post build stage failure due to invalid dirty
......................................................................

build_tools: fix post build stage failure due to invalid dirty

After ongoing difficulties with staging due to the checkout
being marked dirty, this solution was found to force git to
recheck the directory prior to building the tag. This issue
was a problem only where significant build actions modified
tracked files, even though they were put back correctly.

Change-Id: I04ac115beeef67b98394be5e423b0892c268d016
---
M build_tools/make_version
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/repotools refs/changes/41/4241/1

diff --git a/build_tools/make_version b/build_tools/make_version
index 9b7a118..1337e16 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -22,6 +22,10 @@
         echo "UNKNOWN__and_probably_unsupported"
         exit 1
     fi
+
+    # see: http://stackoverflow.com/questions/16035240/why-is-git-describe-dirty-adding-a-dirty-suffix-when-describing-a-clean-ch
+    git update-index --refresh
+
     MODIFIED=""
     VERSION=`${GIT} describe --tags --dirty 2> /dev/null`
     if [ $? -eq 0 ]; then

-- 
To view, visit https://gerrit.asterisk.org/4241
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04ac115beeef67b98394be5e423b0892c268d016
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>



More information about the asterisk-code-review mailing list