Updated \ncc\Classes > GitClient > checkout()
to update submoudles.
This commit is contained in:
parent
c2d0e6e23c
commit
56c59ba4f4
2 changed files with 25 additions and 0 deletions
|
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Refactored `\ncc\Objects > PackageLock`
|
||||
- Updated `defuse\php-encryption` to version 2.4.0
|
||||
- Updated `\ncc\Classes > GitClient > cloneRepositor()` to clone submodules recursively by default
|
||||
- Updated `\ncc\Classes > GitClient > checkout()` to update submoudles.
|
||||
|
||||
### Fixed
|
||||
- Fixed issue in `\ncc\Managers > ExecutionPointerManager > executeUnit()` where if ttyMode is enabled in a non-tty
|
||||
|
|
|
@ -84,9 +84,33 @@ namespace ncc\Classes;
|
|||
});
|
||||
|
||||
if (!$process->isSuccessful())
|
||||
{
|
||||
throw new GitCheckoutException($process->getErrorOutput());
|
||||
}
|
||||
|
||||
Console::outVerbose('Checked out branch: ' . $branch);
|
||||
|
||||
Console::outVerbose('Updating submodules');
|
||||
$process = new Process(["git", "submodule", "update", "--init", "--recursive"], $path);
|
||||
$process->setTimeout(3600); // 1 hour
|
||||
$process->run(function ($type, $buffer)
|
||||
{
|
||||
if (Process::ERR === $type)
|
||||
{
|
||||
Console::outWarning($buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console::outVerbose($buffer);
|
||||
}
|
||||
});
|
||||
|
||||
if (!$process->isSuccessful())
|
||||
{
|
||||
throw new GitCheckoutException($process->getErrorOutput());
|
||||
}
|
||||
|
||||
Console::outVerbose('Submodules updated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue