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

George Joseph asteriskteam at digium.com
Tue Nov 1 11:33:25 CDT 2016


George Joseph has submitted this change and it was merged. ( 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(-)

Approvals:
  George Joseph: Looks good to me, approved; Verified
  Corey Farrell: Looks good to me, but someone else must approve



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: merged
Gerrit-Change-Id: I04ac115beeef67b98394be5e423b0892c268d016
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>



More information about the asterisk-code-review mailing list