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