aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-03-24 15:49:52 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-03-24 15:49:52 -0300
commiteccfe05e99a17b1a8e38dc0cfc0ad79632b5e4ac (patch)
tree5e2d31357470cccb7a8ee508f7bfaad02c748a00
parent1cb2f886d9bd8cc244bc1c464442fe04e7057720 (diff)
downloadhydra-eccfe05e99a17b1a8e38dc0cfc0ad79632b5e4ac.tar.gz
hydra-eccfe05e99a17b1a8e38dc0cfc0ad79632b5e4ac.tar.bz2
Fixes for module-{update,verify}
-rwxr-xr-xshare/hydra/module-update2
-rwxr-xr-xshare/hydra/module-verify9
2 files changed, 5 insertions, 6 deletions
diff --git a/share/hydra/module-update b/share/hydra/module-update
index f8a7ce3..f4c70c7 100755
--- a/share/hydra/module-update
+++ b/share/hydra/module-update
@@ -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
diff --git a/share/hydra/module-verify b/share/hydra/module-verify
index aa84c4d..29e9930 100755
--- a/share/hydra/module-verify
+++ b/share/hydra/module-verify
@@ -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."