Skip to content

Commit

Permalink
Merge pull request #32 from dokku/josegonzalez-patch-1
Browse files Browse the repository at this point in the history
Move safe.directory setting before ci-pre-deploy hook
  • Loading branch information
josegonzalez authored Sep 10, 2022
2 parents 8c9eb69 + 22fe449 commit ffcbfa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/dokku-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ if [ -n "$REVIEW_APP_NAME" ] && [ "$app_name" != "$REVIEW_APP_NAME" ]; then
GIT_REMOTE_URL="${GIT_REMOTE_URL%"/$app_name"}/${REVIEW_APP_NAME}"
fi

git config --global --add safe.directory "$PWD"

if [ -f "bin/ci-pre-deploy" ]; then
log-info "Executing bin/ci-pre-deploy script"
chmod +x bin/ci-pre-deploy
Expand All @@ -89,7 +91,6 @@ if [ -n "$DEPLOY_DOCKER_IMAGE" ]; then
ssh "$ssh_remote" -- git:from-image "$remote_app_name" "$DEPLOY_DOCKER_IMAGE" "$DEPLOY_USER_NAME" "$DEPLOY_USER_EMAIL"
else
log-info "Pushing to Dokku Host"
git config --global --add safe.directory "$PWD"
# shellcheck disable=SC2086
git push $GIT_PUSH_FLAGS "$GIT_REMOTE_URL" "$commit_sha:refs/heads/$BRANCH"
fi

0 comments on commit ffcbfa9

Please sign in to comment.