aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/module-update
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydra/module-update')
-rwxr-xr-xshare/hydra/module-update11
1 files changed, 10 insertions, 1 deletions
diff --git a/share/hydra/module-update b/share/hydra/module-update
index f4c70c7..0a9fc1a 100755
--- a/share/hydra/module-update
+++ b/share/hydra/module-update
@@ -34,7 +34,16 @@ function hydra_module_update {
fi
# Update the module
- ( cd $PUPPET/modules/$MODULE; git pull )
+ (
+ cd $PUPPET/modules/$MODULE
+
+ # Ensure the submodule has a branch
+ if git branch | grep -q "(no branch)"; then
+ git checkout master
+ fi
+
+ git pull
+ )
# Verify the module
if ! hydra $HYDRA module-verify $MODULE; then