diff --git a/plugin.sh b/plugin.sh index 6892de1..28d9d42 100755 --- a/plugin.sh +++ b/plugin.sh @@ -25,10 +25,19 @@ output_versions(){ } run_abra_cmd() { - echo "--- start deploy ---" + echo "--- start command ---" + + if [[ $PLUGIN_COMMAND == *"release"* ]]; then + echo "Detected release command, attempting to detect recipe now..." + repo=$(echo "$PLUGIN_COMMAND" | cut -d' ' -f2) + echo "Automagically detected $repo as desired recipe repository, cloning now..." + git clone "https://git.autonomic.zone/coop-cloud/$repo.git" + fi + # shellcheck disable=SC2086 $ABRA --debug --no-prompt $PLUGIN_COMMAND - echo "--- end deploy ---" + + echo "--- end command ---" } run_plugin() {