mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	Tweak excludes files.
This commit is contained in:
		
							parent
							
								
									a71bd5fca0
								
							
						
					
					
						commit
						df632b3fe3
					
				@ -52,7 +52,7 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
 | 
				
			|||||||
        $this->checkOverrideRelease();
 | 
					        $this->checkOverrideRelease();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $excludes = $this->getExcludes();
 | 
					        $excludes = $this->getExcludes();
 | 
				
			||||||
        $excludesListFilePath = $this->getConfig()->deployment('file_containing_excludes', '');
 | 
					        $excludesListFilePath = $this->getConfig()->deployment('excludes_file', '');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // If we are working with releases
 | 
					        // If we are working with releases
 | 
				
			||||||
        $deployToDirectory = $this->getConfig()->deployment('to');
 | 
					        $deployToDirectory = $this->getConfig()->deployment('to');
 | 
				
			||||||
@ -122,14 +122,14 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Generates the Exclude from file for rsync
 | 
					     * Generates the Exclude from file for rsync
 | 
				
			||||||
     * @param string $excludesFilePath
 | 
					     * @param string $excludesFile
 | 
				
			||||||
     * @return string
 | 
					     * @return string
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    protected function excludesListFile($excludesFilePath)
 | 
					    protected function excludesListFile($excludesFile)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $excludesListFileRsync = '';
 | 
					        $excludesListFileRsync = '';
 | 
				
			||||||
        if(!empty($excludesFilePath)) {
 | 
					        if(!empty($excludesFile) && file_exists($excludesFile) && is_file($excludesFile) && is_readable($excludesFile)) {
 | 
				
			||||||
            $excludesListFileRsync = ' --exclude-from=' . $excludesFilePath;
 | 
					            $excludesListFileRsync = ' --exclude-from=' . $excludesFile;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return $excludesListFileRsync;
 | 
					        return $excludesListFileRsync;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -46,7 +46,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
 | 
				
			|||||||
        $this->checkOverrideRelease();
 | 
					        $this->checkOverrideRelease();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $excludes = $this->getExcludes();
 | 
					        $excludes = $this->getExcludes();
 | 
				
			||||||
        $excludesListFilePath   = $this->getConfig()->deployment('file_containing_excludes', '');;
 | 
					        $excludesListFilePath   = $this->getConfig()->deployment('excludes_file', '');;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // If we are working with releases
 | 
					        // If we are working with releases
 | 
				
			||||||
        $deployToDirectory = $this->getConfig()->deployment('to');
 | 
					        $deployToDirectory = $this->getConfig()->deployment('to');
 | 
				
			||||||
@ -117,15 +117,15 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Generates the Exclude from file for TarGz
 | 
					     * Generates the Exclude from file for rsync
 | 
				
			||||||
     * @param string $excludesFilePath
 | 
					     * @param string $excludesFile
 | 
				
			||||||
     * @return string
 | 
					     * @return string
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    protected function excludesListFile($excludesFilePath)
 | 
					    protected function excludesListFile($excludesFile)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $excludesListFileRsync = '';
 | 
					        $excludesListFileRsync = '';
 | 
				
			||||||
        if(!empty($excludesFilePath)) {
 | 
					        if(!empty($excludesFile) && file_exists($excludesFile) && is_file($excludesFile) && is_readable($excludesFile)) {
 | 
				
			||||||
            $excludesListFileRsync = ' --exclude-from=' . $excludesFilePath;
 | 
					            $excludesListFileRsync = ' --exclude-from=' . $excludesFile;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return $excludesListFileRsync;
 | 
					        return $excludesListFileRsync;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user