mirror of https://github.com/hauke68/Magallanes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
13 years ago
|
<?php
|
||
|
class Mage_Task_BuiltIn_Deployment_Releases
|
||
|
extends Mage_Task_TaskAbstract
|
||
|
{
|
||
|
public function getName()
|
||
|
{
|
||
|
return 'Releasing [built-in]';
|
||
|
}
|
||
|
|
||
|
public function run()
|
||
|
{
|
||
|
if (isset($this->_config['deploy']['releases']['enabled'])) {
|
||
|
if ($this->_config['deploy']['releases']['enabled'] == 'true') {
|
||
|
if (isset($this->_config['deploy']['releases']['directory'])) {
|
||
|
$releasesDirectory = $this->_config['deploy']['releases']['directory'];
|
||
|
} else {
|
||
|
$releasesDirectory = 'releases';
|
||
|
}
|
||
|
if (isset($this->_config['deploy']['releases']['symlink'])) {
|
||
|
$symlink = $this->_config['deploy']['releases']['symlink'];
|
||
|
} else {
|
||
|
$symlink = 'current';
|
||
|
}
|
||
|
|
||
|
$currentCopy = $releasesDirectory
|
||
|
. '/' . $this->_config['deploy']['releases']['_id'];
|
||
|
|
||
|
$result = $this->_runRemoteCommand('ln -sf ' . $currentCopy . ' ' . $symlink);
|
||
|
return $result;
|
||
|
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|