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