mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Fix issue with submodules and Base Directory
This commit is contained in:
parent
69082670f9
commit
c906212c18
1 changed files with 17 additions and 1 deletions
|
|
@ -1492,9 +1492,25 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||
]
|
||||
);
|
||||
$this->create_workdir();
|
||||
|
||||
$dirWithCommit = $this->workdir;
|
||||
if ($this->application->settings->is_git_submodules_enabled && $this->basedir !== $this->workdir) {
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
executeInDocker($this->deployment_uuid, "if git cat-file -e {$this->commit}^{commit} > /dev/null 2>&1;then echo 'No'; else echo 'Yes';fi"),
|
||||
'hidden' => true,
|
||||
'save' => 'workdir_is_submodule',
|
||||
]
|
||||
);
|
||||
$this->application_deployment_queue->addLogEntry("Workdir is submodule: {$this->saved_outputs->get('workdir_is_submodule')}");
|
||||
if (trim($this->saved_outputs->get('workdir_is_submodule')) === 'Yes') {
|
||||
$dirWithCommit = $this->basedir;
|
||||
}
|
||||
}
|
||||
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
executeInDocker($this->deployment_uuid, "cd {$this->workdir} && git log -1 {$this->commit} --pretty=%B"),
|
||||
executeInDocker($this->deployment_uuid, "cd {$dirWithCommit} && git log -1 {$this->commit} --pretty=%B"),
|
||||
'hidden' => true,
|
||||
'save' => 'commit_message',
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue