Mage/Task/BuiltIn/Deployment/ReleaseTask.php
/**
     * Releases a Deployment: points the current symbolic link to the release directory
     * @see \Mage\Task\AbstractTask::run()
     */
Releases a Deployment: points the current symbolic link to the release directory
@see \Mage\Task\AbstractTask::run()
Releases a Deployment : points the current symbolic link to the release directory @see \ Mage \ Task \ AbstractTask :: run ()
public function run()
    {
        if ($this->getConfig()->release('enabled', false) == true) {
            $releasesDirectory = $this->getConfig()->release('directory', 'releases');
            $symlink = $this->getConfig()->release('symlink', 'current');
            if (substr($symlink, 0, 1) == '/') {
                $releasesDirectory = rtrim($this->getConfig()->deployment('to'), '/') . '/' . $releasesDirectory;
            }
            $currentCopy = $releasesDirectory . '/' . $this->getConfig()->getReleaseId();
            $userGroup = '33:33';
            $resultFetch = $this->runCommandRemote('ls -ld . | awk \'{print \$3":"\$4}\'', $userGroup);
            $command = 'rm -f ' . $symlink
                     . ' ; '
                     . 'ln -sf ' . $currentCopy . ' ' . $symlink
                     . ' && '
                     . 'chown -h ' . $userGroup . ' ' . $symlink
                     . ' && '
                     . 'chown -R ' . $userGroup . ' ' . $currentCopy;
            $result = $this->runCommandRemote($command);
            $result = $this->runCommandRemote('chown ' . $userGroup . ' ' . $releasesDirectory);
            return $result;
        } else {
            return false;
        }
    }
public function run ( ) { if ( $ this -> getConfig ( ) -> release ( 'enabled' , false ) == true ) { $ releasesDirectory = $ this -> getConfig ( ) -> release ( 'directory' , 'releases' ) ; $ symlink = $ this -> getConfig ( ) -> release ( 'symlink' , 'current' ) ; if ( substr ( $ symlink , 0 , 1 ) == '/' ) { $ releasesDirectory = rtrim ( $ this -> getConfig ( ) -> deployment ( 'to' ) , '/' ) . '/' . $ releasesDirectory ; } $ currentCopy = $ releasesDirectory . '/' . $ this -> getConfig ( ) -> getReleaseId ( ) ; $ userGroup = '33:33' ; $ resultFetch = $ this -> runCommandRemote ( 'ls -ld . | awk \'{print \$3":"\$4}\'' , $ userGroup ) ; $ command = 'rm -f ' . $ symlink . ' ; ' . 'ln -sf ' . $ currentCopy . ' ' . $ symlink . ' && ' . 'chown -h ' . $ userGroup . ' ' . $ symlink . ' && ' . 'chown -R ' . $ userGroup . ' ' . $ currentCopy ; $ result = $ this -> runCommandRemote ( $ command ) ; $ result = $ this -> runCommandRemote ( 'chown ' . $ userGroup . ' ' . $ releasesDirectory ) ; return $ result ; } else { return false ; } }
Releases a Deployment: points the current symbolic link to the release directory
 @see \Mage\Task\AbstractTask::run()
Releases a Deployment : points the current symbolic link to the release directory @see \ Mage \ Task \ AbstractTask :: run ()
// Fetch the user and group from base directory; defaults usergroup to 33:33 // Remove symlink if exists; create new symlink and change owners // Set Directory Releases to same owner