Permalink
Browse files

Merge branch 'feature/5'

  • Loading branch information...
2 parents 5b15a1c + 51e101c commit 7848723921e0188039e6ca21b7a7dfa9addb9655 @ptitfred ptitfred committed Sep 12, 2011
Showing with 28 additions and 2 deletions.
  1. +2 −2 client/magrit
  2. +26 −0 client/magrit-build-log
View
@@ -1,10 +1,10 @@
#!/bin/bash
-if [ $# -eq 1 ]
+if [ $# -ge 1 ]
then
if [[ $(which magrit-$1) ]]
then
- magrit-$1
+ magrit-$1 $2
else
echo "Magrit: commande magrit $1 inconnue."
fi
View
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+remote=$(git config --get magrit.remote)
+if [[ "$remote" == "" ]]; then
+ remote='magrit'
+fi
+
+ssh_url=$(git config --local remote.${remote}.url)
+
+ssh_url=${ssh_url:6}
+user=${ssh_url%@*}
+ssh_url=${ssh_url#*@}
+host=${ssh_url%:*}
+ssh_url=${ssh_url#*:}
+port=${ssh_url%/*}
+repo="/${ssh_url#*/}/"
+
+for sha1 in $(git log --no-merges --format=%H $1); do
+ buildStatus=$(ssh -x -p $port $user@$host "magrit status $repo $sha1")
+ log=$(git log -1 --oneline $sha1)
+ len=${#log}
+ blanks=" "
+ log="${log:0:60}${blanks:$len}"
+ echo -e "$log \t| $buildStatus"
+done
+

0 comments on commit 7848723

Please sign in to comment.