Added ability to merge in-database project config over in-repository
config instead of only overwrite. This commit solve issues: #14, #70, #106, #121.
This commit is contained in:
parent
f2a1ab39a2
commit
069026bc2d
20 changed files with 277 additions and 130 deletions
|
|
@ -59,10 +59,10 @@ class GitBuild extends Build
|
|||
foreach ($branches as $branch) {
|
||||
$success = $builder->executeCommand($cmd, $buildPath, $branch);
|
||||
if (!$success) {
|
||||
$builder->log('Fail merge branch origin/'.$branch, LogLevel::ERROR);
|
||||
$builder->log('Fail merge branch origin/' . $branch, LogLevel::ERROR);
|
||||
return false;
|
||||
}
|
||||
$builder->log('Merged branch origin/'.$branch, LogLevel::INFO);
|
||||
$builder->log('Merged branch origin/' . $branch, LogLevel::INFO);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
@ -75,10 +75,9 @@ class GitBuild extends Build
|
|||
{
|
||||
$cmd = 'cd .. && git clone --recursive ';
|
||||
|
||||
$depth = $builder->getConfig('clone_depth');
|
||||
|
||||
if (!is_null($depth)) {
|
||||
$cmd .= ' --depth ' . intval($depth) . ' ';
|
||||
$buildSettings = $builder->getConfig('build_settings');
|
||||
if ($buildSettings && isset($buildSettings['clone_depth'])) {
|
||||
$cmd .= ' --depth ' . intval($buildSettings['clone_depth']) . ' ';
|
||||
}
|
||||
|
||||
$cmd .= ' -b "%s" "%s" "%s"';
|
||||
|
|
@ -102,10 +101,9 @@ class GitBuild extends Build
|
|||
// Do the git clone:
|
||||
$cmd = 'cd .. && git clone --recursive ';
|
||||
|
||||
$depth = $builder->getConfig('clone_depth');
|
||||
|
||||
if (!is_null($depth)) {
|
||||
$cmd .= ' --depth ' . intval($depth) . ' ';
|
||||
$buildSettings = $builder->getConfig('build_settings');
|
||||
if ($buildSettings && isset($buildSettings['clone_depth'])) {
|
||||
$cmd .= ' --depth ' . intval($buildSettings['clone_depth']) . ' ';
|
||||
}
|
||||
|
||||
$cmd .= ' -b "%s" "%s" "%s"';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue