From: Sandon Van Ness Date: Thu, 10 Jul 2014 22:57:24 +0000 (-0700) Subject: Get SHA1 from branches.sh instead of running rev-parse. X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7900c8f89ec63b427540eac09154b95b54648846;p=autobuild-ceph.git Get SHA1 from branches.sh instead of running rev-parse. Doing a git-rev parse gives the wrong (non-detatched) sha1 of the actual tag instead of the commit which means for tags we get the wrong sha1. Instead use branches.sh with -v which gives the expected sha1. Signed-off-by: Sandon Van Ness --- diff --git a/run-real b/run-real index a4ddfe6..c1d571b 100755 --- a/run-real +++ b/run-real @@ -21,8 +21,8 @@ find "$REF_OUTDIR" -mindepth 1 -maxdepth 1 -name '*.tmp' -print0 \ # update symlinks that make branch point to the latest successful # output dir for that branch install -d -m0755 -- "$REF_OUTDIR" -( ./branches.sh ) \ -| while read REF; do +( ./branches.sh -v ) \ +| while read SHA REF; do # mangle unsafe characters in branch names, just in case (slashes # and leading periods); gitbuilder hanging on to "origin/" here # makes the typical result a bit ugly @@ -32,7 +32,6 @@ install -d -m0755 -- "$REF_OUTDIR" # collisions, but we're gonna ignore that for now SAFE_REF="${SAFE_REF#origin_}" - SHA=`cd build && git rev-parse $REF` echo "ref $SAFE_REF $SHA" if [ -L "$REF_OUTDIR/$SAFE_REF" ]; then