]> gitweb.fluxo.info Git - hydra.git/commitdiff
Allow work on different branches on module-{update,verify}
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Mar 2015 18:35:19 +0000 (15:35 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Mar 2015 18:35:19 +0000 (15:35 -0300)
share/hydra/module-update
share/hydra/module-verify

index 99dbd7fcb59d732d7b264e84fb19fc98f1e1532e..f8a7ce32a0783b2002776590777bc332a995fff1 100755 (executable)
@@ -34,7 +34,7 @@ function hydra_module_update {
   fi
   
   # Update the module
-  ( cd $PUPPET/modules/$MODULE; git pull origin master )
+  ( cd $PUPPET/modules/$MODULE; git pull origin `git branch` )
   
   # Verify the module
   if ! hydra $HYDRA module-verify $MODULE; then
index cdc6b294f3a2becb2df5c4e7eb6605b07ce50e36..aa84c4deb9a0415352c08fda9d30e23aa3413ece 100755 (executable)
@@ -35,7 +35,7 @@ HASH_SUBMODULE="`git submodule | grep -E "modules/$MODULE( |$)" | awk '{ print $
 
 cd $HYDRA_FOLDER/modules/$MODULE
 
-HASH_MODULE="`git log -1 | grep "^commit" | awk '{ print $2 }' | sed -e 's/\+//'`"
+HASH_MODULE="`git log -1 "commit" | awk '{ print $2 }' | sed -e 's/\+//'`"
 
 if [ "$HASH_MODULE" != "$HASH_SUBMODULE" ]; then
   echo "Module $MODULE: hash differ!!:"