feat: always initialize git repository
This fixes issues where alternative tools that don't trigger the init via sshcommand - such as git-http-backend - are not able to setup applications correctly. Note that those apps could always manually trigger git:initialize if desired, but if the app already exists, then this should already _just work_ without that extra initialization.
This commit is contained in:
@@ -172,9 +172,14 @@ git_build() {
|
||||
local REF="$REV"
|
||||
else
|
||||
DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
||||
REF=$(<"$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH")
|
||||
if [[ -f "$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH" ]]; then
|
||||
REF=$(<"$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$REF" ]]; then
|
||||
return
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
git_build_app_repo $APP $REF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user