mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-05 00:48:57 +02:00
Tweak clones.
This commit is contained in:
+5
-26
@@ -121,29 +121,6 @@ class Config
|
||||
return $this->parseConfigFile($filePath);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Obviously this method is a HACK. It was refactored from ::loadEnvironment()
|
||||
* TODO Please put it to SCM functionality.
|
||||
*
|
||||
* @param array $settings
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function updateSCMTempDir(array $settings)
|
||||
{
|
||||
// Create temporal directory for clone
|
||||
if (isset($settings['deployment']['source']) && is_array($settings['deployment']['source'])) {
|
||||
if (trim($settings['deployment']['source']['temporal']) == '') {
|
||||
$settings['deployment']['source']['temporal'] = sys_get_temp_dir();
|
||||
}
|
||||
$settings['deployment']['source']['temporal']
|
||||
= rtrim($settings['deployment']['source']['temporal'], '/') . '/' . md5(microtime()) . '/';
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Environment configuration
|
||||
* @param $filePath string
|
||||
@@ -156,9 +133,6 @@ class Config
|
||||
|
||||
$settings = $this->parseConfigFile($filePath);
|
||||
|
||||
//this is a HACK in the old code - no time to remove it now, so I factored it out in own method
|
||||
$settings = $this->updateSCMTempDir($settings);
|
||||
|
||||
return $settings;
|
||||
|
||||
}
|
||||
@@ -490,6 +464,11 @@ class Config
|
||||
}
|
||||
}
|
||||
|
||||
public function setSourceTemporal($directory)
|
||||
{
|
||||
$this->environmentConfig['deployment']['source']['temporal'] = $directory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Releasing Options
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user