mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-27 09:48:55 +02:00
Change SCM configs.
This commit is contained in:
+10
-32
@@ -8,7 +8,6 @@ class Mage_Config
|
||||
private $_releaseId = null;
|
||||
private $_config = array(
|
||||
'general' => array(),
|
||||
'scm' => array(),
|
||||
'environment' => array(),
|
||||
);
|
||||
|
||||
@@ -78,6 +77,16 @@ class Mage_Config
|
||||
return $this->_parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds (or replaces) a parameter
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function addParameter($name, $value = true)
|
||||
{
|
||||
$this->_parameters[$name] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Current environment
|
||||
*
|
||||
@@ -218,27 +227,6 @@ class Mage_Config
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets SCM Configuration
|
||||
*
|
||||
* @param string $option
|
||||
* @param string $default
|
||||
* @return mixed
|
||||
*/
|
||||
public function scm($option, $default = false)
|
||||
{
|
||||
$config = $this->_config['scm'];
|
||||
if (isset($config[$option])) {
|
||||
if (is_array($default) && ($config[$option] == '')) {
|
||||
return $default;
|
||||
} else {
|
||||
return $config[$option];
|
||||
}
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get deployment configuration
|
||||
*
|
||||
@@ -354,16 +342,6 @@ class Mage_Config
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the SCM Configuration
|
||||
*/
|
||||
private function _loadSCM()
|
||||
{
|
||||
if (file_exists('.mage/config/scm.yml')) {
|
||||
$this->_config['scm'] = spyc_load_file('.mage/config/scm.yml');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Environment configuration
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user