diff --git a/functions b/functions index c897f74..705b15d 100755 --- a/functions +++ b/functions @@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" clone_main_cmd() { declare desc="creates/updates app from remote git repo" - declare APP="$2" GITURL="$3" TAGNAME="$4" + declare APP="$2" GITURL="$3" TAGNAME="${4:-master}" local cmd="$1" local APP_PATH=$DOKKU_ROOT/$APP local PRERECEIVE_HOOK="$APP_PATH/hooks/pre-receive" @@ -20,9 +20,9 @@ clone_main_cmd() { git clone "$GITURL" .clone else dokku_log_info1 "Creating $APP from $GITURL $TAGNAME" - git clone --depth 1 -n -qq --branch "$TAGNAME" "$GITURL" .clone + git clone -n -qq "$GITURL" .clone cd .clone - git checkout -qq -b master + git checkout -qq "$TAGNAME" cd .. fi rsync -a "$DOKKU_ROOT/$APP/.clone/.git/" ./