]> git.ozlabs.org Git - next-scripts/commitdiff
do a build after mergeing akpm-current
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 10 May 2013 00:47:55 +0000 (10:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 10 May 2013 00:47:55 +0000 (10:47 +1000)
merge_akpm

index e09625d1316f4bb848addddf7f4dc8064c3c5d4d..aa4e984bfabffe956f68aba47de073d289454dbf 100755 (executable)
@@ -46,6 +46,7 @@ git branch -f akpm-current/current akpm/current
 
 git branch -f akpm/base HEAD
 
+old_head=$(git rev-parse HEAD)
 hlog=$(git log -1 --oneline akpm-current/current) 2>/dev/null
 log Merging akpm-current/current "($hlog)"
 execute git merge akpm-current/current || {
@@ -60,6 +61,33 @@ execute git merge akpm-current/current || {
 }
 printf "%s\t%s\n" akpm-current $(git show-ref --hash akpm-current/current) >> $SHA1_FILE
 
+[ -f "../merge-fixes/akpm-current" ] && {
+       for p in $(cat "../merge-fixes/akpm-current"); do
+               $(dirname $0)/merge_fix -n "$p" || {
+                       bash -i || exit
+               }
+       done
+}
+[ -x "../pre-build/akpm-current" ] && {
+       "../pre-build/akpm-current" || bash -i || exit
+}
+
+new_head=$(git rev-parse HEAD)
+
+$no_build ||
+       [ "$old_head" = "$new_head" ] ||
+       [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || {
+
+       git push -f "$build_host":"$build_dir" master:refs/heads/next || {
+               echo git push failed 1>&2
+               bash -i || exit
+       }
+       ssh "$build_host" "$build_cmd" || {
+               echo Build failed 1>&2
+               bash -i || exit
+       }
+}
+
 execute git clone -s -l -n -q . ../rebase-tmp || {
        echo Clone failed 1>&2
        bash -i || exit
@@ -86,6 +114,7 @@ execute rm -rf ../rebase-tmp
 
 git branch -f akpm/master-base HEAD
 
+old_head=$(git rev-parse HEAD)
 log Merging akpm/master '('$(git log -1 --oneline akpm/master)')'
 execute git merge --no-ff akpm/master || {
        echo Merge failed 1>&2
@@ -104,15 +133,20 @@ printf "%s\t\t%s\n" akpm $(git show-ref --hash akpm/master) >> $SHA1_FILE
        "../pre-build/akpm" || bash -i || exit
 }
 
-$no_build && exit 0
+new_head=$(git rev-parse HEAD)
 
-git push -f "$build_host":"$build_dir" master:refs/heads/next || {
-       echo git push failed 1>&2
-       bash -i || exit
-}
-ssh "$build_host" "$build_cmd" || {
-       echo Build failed 1>&2
-       bash -i || exit
+$no_build ||
+       [ "$old_head" = "$new_head" ] ||
+       [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || {
+
+       git push -f "$build_host":"$build_dir" master:refs/heads/next || {
+               echo git push failed 1>&2
+               bash -i || exit
+       }
+       ssh "$build_host" "$build_cmd" || {
+               echo Build failed 1>&2
+               bash -i || exit
+       }
 }
 
 exit 0