diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-11-13 16:01:50 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-11-13 16:01:50 -0200 |
commit | 1c975d65f221eb78baf2808893c059091740da2a (patch) | |
tree | 74f045e035ccea1150b0bf2ef92dbcc5ddfcea31 /share/hydra/module-update | |
parent | aad028515f31567af2155c7448201663535000a3 (diff) | |
download | hydra-1c975d65f221eb78baf2808893c059091740da2a.tar.gz hydra-1c975d65f221eb78baf2808893c059091740da2a.tar.bz2 |
Initial deploy and module-update tasks
Diffstat (limited to 'share/hydra/module-update')
-rwxr-xr-x | share/hydra/module-update | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/share/hydra/module-update b/share/hydra/module-update new file mode 100755 index 0000000..3887bd2 --- /dev/null +++ b/share/hydra/module-update @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Update a puppet module +# + +# Load +source $APP_BASE/lib/hydra/functions || exit 1 +hydra_config_load + +# Command line arguments +MODULE="$1" + +# Validation +if [ -z "$MODULE" ]; then + echo "Usage: hydra <hydra> module-update <module>" + exit 1 +elif [ ! -d "$PUPPET/modules/$MODULE" ]; then + echo "No such module $MODULE at $HYDRA puppet configuration." + exit 1 +fi + +# Update the module +( cd $PUPPET/modules/$MODULE; git pull origin master ) +( cd $PUPPET; git commit -a -m "Updating module $MODULE"; git push ) |