]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fixes for module-{update,verify}
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Mar 2015 18:49:52 +0000 (15:49 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Mar 2015 18:49:52 +0000 (15:49 -0300)
share/hydra/module-update
share/hydra/module-verify

index f8a7ce32a0783b2002776590777bc332a995fff1..f4c70c79532fcaa2a7addda89961508de04e545f 100755 (executable)
@@ -34,7 +34,7 @@ function hydra_module_update {
   fi
   
   # Update the module
-  ( cd $PUPPET/modules/$MODULE; git pull origin `git branch` )
+  ( cd $PUPPET/modules/$MODULE; git pull )
   
   # Verify the module
   if ! hydra $HYDRA module-verify $MODULE; then
index aa84c4deb9a0415352c08fda9d30e23aa3413ece..29e9930a412659af276805b7c1f3e7699d4e32d2 100755 (executable)
@@ -35,13 +35,12 @@ HASH_SUBMODULE="`git submodule | grep -E "modules/$MODULE( |$)" | awk '{ print $
 
 cd $HYDRA_FOLDER/modules/$MODULE
 
-HASH_MODULE="`git log -1 "commit" | awk '{ print $2 }' | sed -e 's/\+//'`"
+HASH_MODULE="`git log -1 "$HASH_SUBMODULE" | head -n 1 | awk '{ print $2 }' | sed -e 's/\+//'`"
 
 if [ "$HASH_MODULE" != "$HASH_SUBMODULE" ]; then
-  echo "Module $MODULE: hash differ!!:"
-  echo "Module:    $HASH_MODULE"
-  echo "Submodule: $HASH_SUBMODULE"
+  echo "Module $MODULE: commit not found!:"
+  echo "Commit: $HASH_SUBMODULE"
   exit 1
 fi
 
-echo "Latest commit hash match."
+echo "Commit check successful for $MODULE module."