public function deploy()
    {
        if (empty($this->context) || empty($this->siteDomain) || empty($this->deviceView) || empty($this->design))
            return;

        $files = null;
        $md5 = null;
        $contents = null;

        $aggregatePath = $this->getAggregatePath();

        $this->Logger->debug("Aggregate Path: {$aggregatePath}");

        if ($this->isDevelopmentMode || $this->isOneOffRedeploy || !$this->deploymentCacheExists($aggregatePath)) {
            $this->Logger->debug("Retrieving file list...");
            list($files,$md5) = $this->getFiles();
        }

        if ($this->deploymentCacheExists($aggregatePath)) {

            //if this is NOT development mode, the only way to force a refresh is to delete the .json file
            if($this->isDevelopmentMode === false && $this->isOneOffRedeploy === false)
                return;

            $this->Logger->debug("Checking cache JSON...");
            $this->getDeployedFiles();

            //if this IS development mode, a refresh is performed everytime the md5's dont' match
            if (($this->isDevelopmentMode === true || $this->isOneOffRedeploy === true) && $md5 === $this->deployedFiles['md5']) {
                //files haven't changed
                return;
            }
        }

        $this->Logger->debug("Rebuilding...");

        //rebuild file
        $this->aggregateFiles($md5, $files, $aggregatePath);
    }
public function deploy()
    {
        if (empty($this->context) || empty($this->siteDomain) || empty($this->deviceView) || empty($this->design))
            return;

        $files = null;
        $md5 = null;
        $contents = null;

        $aggregatePath = $this->getAggregatePath();

        $this->Logger->debug("Aggregate Path: {$aggregatePath}");

        if ($this->isDevelopmentMode || $this->isOneOffRedeploy || !$this->deploymentCacheExists($aggregatePath)) {
            $this->Logger->debug("Retrieving file list...");
            list($files,$md5) = $this->getFiles();
        }

        if ($this->deploymentCacheExists($aggregatePath)) {

            //if this is NOT development mode, the only way to force a refresh is to delete the .json file
            if($this->isDevelopmentMode === false && $this->isOneOffRedeploy === false)
                return;

            $this->Logger->debug("Checking cache JSON...");
            $this->getDeployedFiles();

            //if this IS development mode, a refresh is performed everytime the md5's dont' match
            if (($this->isDevelopmentMode === true || $this->isOneOffRedeploy === true) && $md5 === $this->deployedFiles['md5']) {
                //files haven't changed
                return;
            }
        }

        $this->Logger->debug("Rebuilding...");

        //rebuild file
        $this->aggregateFiles($md5, $files, $aggregatePath);
    }
public function deploy ( ) { if ( empty ( $ this -> context ) || empty ( $ this -> siteDomain ) || empty ( $ this -> deviceView ) || empty ( $ this -> design ) ) return ; $ files = null ; $ md5 = null ; $ contents = null ; $ aggregatePath = $ this -> getAggregatePath ( ) ; $ this -> Logger -> debug ( "Aggregate Path: {$aggregatePath}" ) ; if ( $ this -> isDevelopmentMode || $ this -> isOneOffRedeploy || ! $ this -> deploymentCacheExists ( $ aggregatePath ) ) { $ this -> Logger -> debug ( "Retrieving file list..." ) ; list ( $ files , $ md5 ) = $ this -> getFiles ( ) ; } if ( $ this -> deploymentCacheExists ( $ aggregatePath ) ) { //if this is NOT development mode, the only way to force a refresh is to delete the .json file if ( $ this -> isDevelopmentMode === false && $ this -> isOneOffRedeploy === false ) return ; $ this -> Logger -> debug ( "Checking cache JSON..." ) ; $ this -> getDeployedFiles ( ) ; //if this IS development mode, a refresh is performed everytime the md5's dont' match if ( ( $ this -> isDevelopmentMode === true || $ this -> isOneOffRedeploy === true ) && $ md5 === $ this -> deployedFiles [ 'md5' ] ) { //files haven't changed return ; } } $ this -> Logger -> debug ( "Rebuilding..." ) ; //rebuild file $ this -> aggregateFiles ( $ md5 , $ files , $ aggregatePath ) ; }
Aggregates the files if necessary.

@return void
Aggregates the files if necessary .