예제 #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $fs = new Filesystem();
     $projectArg = $input->getOption('project');
     $drupalArg = $input->getOption('drupal');
     $project = !empty($projectArg) && $fs->isAbsolutePath($projectArg) ? $projectArg : implode('/', [getcwd(), $projectArg]);
     $drupal = $fs->isAbsolutePath($drupalArg) ? $drupalArg : implode('/', [getcwd(), $drupalArg]);
     $mapper = new Mapper($this->normalizePath($project), $this->normalizePath($drupal), $input->getOption('copy'));
     $mapper->clear();
     $mapper->mirror($mapper->getMap($this->getApplication()->getComposer(true)->getInstallationManager(), $this->getApplication()->getComposer(true)->getRepositoryManager()));
 }
예제 #2
0
 public static function postUpdate(Event $event)
 {
     $composer = $event->getComposer();
     $extra = $composer->getPackage()->getExtra();
     $config = isset($extra['tangler']) ? $extra['tangler'] : array();
     $project = isset($config['project']) ? $config['project'] : getcwd();
     $drupal = isset($config['drupal']) ? $config['drupal'] : getcwd() . DIRECTORY_SEPARATOR . 'www';
     $copy = isset($config['copy']);
     if (!$copy) {
         // Check for symlink ability. If we don't have it, hard copy.
         // This is great for VMs on Windows hosts.
         $fs = new Filesystem();
         try {
             $fs->symlink($drupal, 'test');
             $fs->remove('test');
         } catch (IOException $e) {
             $copy = TRUE;
         }
     }
     $mapper = new Mapper($project, $drupal, $copy);
     $mapper->mirror($mapper->getMap($composer->getInstallationManager(), $composer->getRepositoryManager()));
 }
예제 #3
0
 public static function postUpdate(Event $event)
 {
     $composer = $event->getComposer();
     $mapper = new Mapper(getcwd(), getcwd() . '/www');
     $mapper->mirror($mapper->getMap($composer->getInstallationManager(), $composer->getRepositoryManager()));
 }
예제 #4
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $mapper = new Mapper(implode('/', [getcwd(), $input->getArgument('project')]), implode('/', [getcwd(), $input->getArgument('drupal')]));
     $mapper->clear();
     $mapper->mirror($mapper->getMap($this->getApplication()->getComposer(true)->getInstallationManager(), $this->getApplication()->getComposer(true)->getRepositoryManager()));
 }