An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
removed redundant if statement
Tom Ferriere01abc2631684
diff --git a/app/Models/Application.php b/app/Models/Application.phpindex 85e5bb1baa..84489ae7b4 100644--- a/app/Models/Application.php+++ b/app/Models/Application.php@@ -809,7 +809,7 @@ class Application extends BaseModel$commands->push("echo 'Checking out $branch'");}$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);- } elseif ($git_type === 'github') {+ } elseif ($git_type === 'github' || $git_type === 'gitea') {$branch = "pull/{$pull_request_id}/head:$pr_branch_name";if ($exec_in_docker) {$commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));@@ -817,14 +817,6 @@ class Application extends BaseModel$commands->push("echo 'Checking out $branch'");}$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);- } elseif ($git_type === 'gitea') {- $branch = "pulls/{$pull_request_id}/head:$pr_branch_name";- if ($exec_in_docker) {- $commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));- } else {- $commands->push("echo 'Checking out $branch'");- }- $git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);} elseif ($git_type === 'bitbucket') {if ($exec_in_docker) {$commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));@@ -861,7 +853,7 @@ class Application extends BaseModel$commands->push("echo 'Checking out $branch'");}$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);- } elseif ($git_type === 'github') {+ } elseif ($git_type === 'github' || $git_type === 'gitea') {$branch = "pull/{$pull_request_id}/head:$pr_branch_name";if ($exec_in_docker) {$commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));@@ -869,14 +861,6 @@ class Application extends BaseModel$commands->push("echo 'Checking out $branch'");}$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);- } elseif ($git_type === 'gitea') {- $branch = "pulls/{$pull_request_id}/head:$pr_branch_name";- if ($exec_in_docker) {- $commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));- } else {- $commands->push("echo 'Checking out $branch'");- }- $git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);} elseif ($git_type === 'bitbucket') {if ($exec_in_docker) {$commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));