Merge branch 'svn-fixes'
This commit is contained in:
commit
23664bdcbf
|
@ -7,7 +7,8 @@ look something like this:
|
|||
|
||||
```yml
|
||||
build_settings:
|
||||
clone_depth: 1 # depth of 1 is a shallow clone, remove this line to clone entire repo
|
||||
# WORKS ONLY IN IN-DATABASE PROJECT CONFIG! Clone depth of 1 is a shallow clone, remove this line to clone entire repo (For Git and Svn only).
|
||||
clone_depth: 1
|
||||
ignore:
|
||||
- "vendor"
|
||||
- "tests"
|
||||
|
@ -15,6 +16,10 @@ build_settings:
|
|||
host: "localhost"
|
||||
user: "root"
|
||||
pass: ""
|
||||
# WORKS ONLY IN IN-DATABASE PROJECT CONFIG! Svn additional CLI options (For example: --username='username').
|
||||
svn:
|
||||
username: "username"
|
||||
password: "password"
|
||||
|
||||
setup:
|
||||
mysql:
|
||||
|
|
|
@ -76,7 +76,7 @@ class GitBuild extends Build
|
|||
$cmd = 'cd .. && git clone --recursive ';
|
||||
|
||||
$buildSettings = $builder->getConfig('build_settings');
|
||||
if ($buildSettings && isset($buildSettings['clone_depth'])) {
|
||||
if ($buildSettings && isset($buildSettings['clone_depth']) && (0 < (integer)$buildSettings['clone_depth'])) {
|
||||
$cmd .= ' --depth ' . intval($buildSettings['clone_depth']) . ' ';
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ class GitBuild extends Build
|
|||
$cmd = 'cd .. && git clone --recursive ';
|
||||
|
||||
$buildSettings = $builder->getConfig('build_settings');
|
||||
if ($buildSettings && isset($buildSettings['clone_depth'])) {
|
||||
if ($buildSettings && isset($buildSettings['clone_depth']) && (0 < (integer)$buildSettings['clone_depth'])) {
|
||||
$cmd .= ' --depth ' . intval($buildSettings['clone_depth']) . ' ';
|
||||
}
|
||||
|
||||
|
|
|
@ -47,16 +47,17 @@ class SvnBuild extends Build
|
|||
{
|
||||
$cmd = $this->svnCommand;
|
||||
|
||||
$svn = $builder->getConfig('svn');
|
||||
if ($svn) {
|
||||
foreach ($svn as $key => $value) {
|
||||
$cmd .= " --${key} ${value} ";
|
||||
}
|
||||
}
|
||||
|
||||
$buildSettings = $builder->getConfig('build_settings');
|
||||
if ($buildSettings && isset($buildSettings['clone_depth'])) {
|
||||
$cmd .= ' --depth ' . intval($buildSettings['clone_depth']) . ' ';
|
||||
if ($buildSettings) {
|
||||
if (isset($buildSettings['svn']) && is_array($buildSettings['svn'])) {
|
||||
foreach ($buildSettings['svn'] as $key => $value) {
|
||||
$cmd .= " --${key} ${value} ";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($buildSettings['clone_depth']) && 0 < (integer)$buildSettings['clone_depth']) {
|
||||
$cmd .= ' --depth ' . intval($buildSettings['clone_depth']) . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$this->svnCommand = $cmd;
|
||||
|
|
|
@ -53,7 +53,6 @@ class Mysql extends Plugin
|
|||
$this->pass = $config['pass'];
|
||||
|
||||
$buildSettings = $this->builder->getConfig('build_settings');
|
||||
|
||||
if (!isset($buildSettings['mysql'])) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue