diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-03-24 18:56:32 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-03-24 18:56:32 -0300 |
commit | fea2ecd327eafaa81b8ff03aefe81a7a36c068eb (patch) | |
tree | 8de2f06fc9b4a49a72e90058a6fd728d71bfd2f7 /share | |
parent | 30b813bf64d200d560bb1d5aef9e6a22e651a7cf (diff) | |
download | hydra-fea2ecd327eafaa81b8ff03aefe81a7a36c068eb.tar.gz hydra-fea2ecd327eafaa81b8ff03aefe81a7a36c068eb.tar.bz2 |
Ensure the submodule has a branch at module-update
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/module-update | 11 |
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 |