]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
Get SHA1 from branches.sh instead of running rev-parse.
authorSandon Van Ness <sandon@inktank.com>
Thu, 10 Jul 2014 22:57:24 +0000 (15:57 -0700)
committerSandon Van Ness <sandon@inktank.com>
Thu, 10 Jul 2014 22:57:24 +0000 (15:57 -0700)
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 <sandon@inktank.com>
run-real

index a4ddfe6dab51f9b596c4912ab8e3d9bcbf02d92e..c1d571beeaf93c56a9f7d6178e42c25d9352e6ba 100755 (executable)
--- 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