mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	[Nostromo] Mess Detector: naming rule
This commit is contained in:
		
							parent
							
								
									424ff95d49
								
							
						
					
					
						commit
						193265e424
					
				@ -104,7 +104,7 @@ class RollbackCommand extends DeployCommand
 | 
			
		||||
        $hosts = $this->runtime->getEnvironmentConfig('hosts');
 | 
			
		||||
        $hostPath = rtrim($this->runtime->getEnvironmentConfig('host_path'), '/');
 | 
			
		||||
 | 
			
		||||
        $releaseAvailableInHosts = 0;
 | 
			
		||||
        $availableInHosts = 0;
 | 
			
		||||
        foreach ($hosts as $host) {
 | 
			
		||||
            $this->runtime->setWorkingHost($host);
 | 
			
		||||
 | 
			
		||||
@ -121,13 +121,13 @@ class RollbackCommand extends DeployCommand
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (in_array($releaseToRollback, $releases)) {
 | 
			
		||||
                $releaseAvailableInHosts++;
 | 
			
		||||
                $availableInHosts++;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $this->runtime->setWorkingHost(null);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($releaseAvailableInHosts === count($hosts)) {
 | 
			
		||||
        if ($availableInHosts === count($hosts)) {
 | 
			
		||||
            return $releaseToRollback;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -36,10 +36,10 @@ class CopyTask extends AbstractFileTask
 | 
			
		||||
 | 
			
		||||
    public function execute()
 | 
			
		||||
    {
 | 
			
		||||
        $from = $this->getFile('from');
 | 
			
		||||
        $to = $this->getFile('to');
 | 
			
		||||
        $copyFrom = $this->getFile('from');
 | 
			
		||||
        $copyTo = $this->getFile('to');
 | 
			
		||||
 | 
			
		||||
        $cmd = sprintf('cp -p %s %s', $from, $to);
 | 
			
		||||
        $cmd = sprintf('cp -p %s %s', $copyFrom, $copyTo);
 | 
			
		||||
 | 
			
		||||
        /** @var Process $process */
 | 
			
		||||
        $process = $this->runtime->runCommand($cmd);
 | 
			
		||||
 | 
			
		||||
@ -36,10 +36,10 @@ class LinkTask extends AbstractFileTask
 | 
			
		||||
 | 
			
		||||
    public function execute()
 | 
			
		||||
    {
 | 
			
		||||
        $from = $this->getFile('from');
 | 
			
		||||
        $to = $this->getFile('to');
 | 
			
		||||
        $linkFrom = $this->getFile('from');
 | 
			
		||||
        $linkTo = $this->getFile('to');
 | 
			
		||||
 | 
			
		||||
        $cmd = sprintf('ln -snf %s %s', $from, $to);
 | 
			
		||||
        $cmd = sprintf('ln -snf %s %s', $linkFrom, $linkTo);
 | 
			
		||||
 | 
			
		||||
        /** @var Process $process */
 | 
			
		||||
        $process = $this->runtime->runCommand($cmd);
 | 
			
		||||
 | 
			
		||||
@ -36,10 +36,10 @@ class MoveTask extends AbstractFileTask
 | 
			
		||||
 | 
			
		||||
    public function execute()
 | 
			
		||||
    {
 | 
			
		||||
        $from = $this->getFile('from');
 | 
			
		||||
        $to = $this->getFile('to');
 | 
			
		||||
        $moveFrom = $this->getFile('from');
 | 
			
		||||
        $moveTo = $this->getFile('to');
 | 
			
		||||
 | 
			
		||||
        $cmd = sprintf('mv %s %s', $from, $to);
 | 
			
		||||
        $cmd = sprintf('mv %s %s', $moveFrom, $moveTo);
 | 
			
		||||
 | 
			
		||||
        /** @var Process $process */
 | 
			
		||||
        $process = $this->runtime->runCommand($cmd);
 | 
			
		||||
 | 
			
		||||
@ -44,11 +44,11 @@ class AsseticDumpTask extends AbstractTask
 | 
			
		||||
    protected function getOptions()
 | 
			
		||||
    {
 | 
			
		||||
        $userGlobalOptions = $this->runtime->getConfigOptions('symfony', []);
 | 
			
		||||
        $userEnvironmentOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $userEnvOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $options = array_merge(
 | 
			
		||||
            ['console' => 'bin/console', 'env' => 'dev', 'flags' => ''],
 | 
			
		||||
            (is_array($userGlobalOptions) ? $userGlobalOptions : []),
 | 
			
		||||
            (is_array($userEnvironmentOptions) ? $userEnvironmentOptions : []),
 | 
			
		||||
            (is_array($userEnvOptions) ? $userEnvOptions : []),
 | 
			
		||||
            $this->options
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -44,11 +44,11 @@ class AssetsInstallTask extends AbstractTask
 | 
			
		||||
    protected function getOptions()
 | 
			
		||||
    {
 | 
			
		||||
        $userGlobalOptions = $this->runtime->getConfigOptions('symfony', []);
 | 
			
		||||
        $userEnvironmentOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $userEnvOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $options = array_merge(
 | 
			
		||||
            ['console' => 'bin/console', 'env' => 'dev', 'target' => 'web', 'flags' => '--symlink --relative'],
 | 
			
		||||
            (is_array($userGlobalOptions) ? $userGlobalOptions : []),
 | 
			
		||||
            (is_array($userEnvironmentOptions) ? $userEnvironmentOptions : []),
 | 
			
		||||
            (is_array($userEnvOptions) ? $userEnvOptions : []),
 | 
			
		||||
            $this->options
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -44,11 +44,11 @@ class CacheClearTask extends AbstractTask
 | 
			
		||||
    protected function getOptions()
 | 
			
		||||
    {
 | 
			
		||||
        $userGlobalOptions = $this->runtime->getConfigOptions('symfony', []);
 | 
			
		||||
        $userEnvironmentOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $userEnvOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $options = array_merge(
 | 
			
		||||
            ['console' => 'bin/console', 'env' => 'dev', 'flags' => ''],
 | 
			
		||||
            (is_array($userGlobalOptions) ? $userGlobalOptions : []),
 | 
			
		||||
            (is_array($userEnvironmentOptions) ? $userEnvironmentOptions : []),
 | 
			
		||||
            (is_array($userEnvOptions) ? $userEnvOptions : []),
 | 
			
		||||
            $this->options
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -44,11 +44,11 @@ class CacheWarmupTask extends AbstractTask
 | 
			
		||||
    protected function getOptions()
 | 
			
		||||
    {
 | 
			
		||||
        $userGlobalOptions = $this->runtime->getConfigOptions('symfony', []);
 | 
			
		||||
        $userEnvironmentOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $userEnvOptions = $this->runtime->getEnvironmentConfig('symfony', []);
 | 
			
		||||
        $options = array_merge(
 | 
			
		||||
            ['console' => 'bin/console', 'env' => 'dev', 'flags' => ''],
 | 
			
		||||
            (is_array($userGlobalOptions) ? $userGlobalOptions : []),
 | 
			
		||||
            (is_array($userEnvironmentOptions) ? $userEnvironmentOptions : []),
 | 
			
		||||
            (is_array($userEnvOptions) ? $userEnvOptions : []),
 | 
			
		||||
            $this->options
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user