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.
23 lines
632 B
23 lines
632 B
<?php |
|
class Mage_Task_Lock |
|
{ |
|
private $_config = null; |
|
|
|
public function run(Mage_Config $config, $unlock = false) |
|
{ |
|
$this->_config = $config; |
|
|
|
if ($config->getEnvironmentName() == '') { |
|
Mage_Console::output('<red>You must specify an environment</red>', 0, 2); |
|
return; |
|
} |
|
|
|
$lockFile = '.mage/' . $config->getEnvironmentName() . '.lock'; |
|
if (file_exists($lockFile)) { |
|
@unlink($lockFile); |
|
} |
|
|
|
Mage_Console::output('Unlocked deployment to <light_purple>' . $config->getEnvironmentName() . '</light_purple> environment', 1, 2); |
|
} |
|
|
|
} |