Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function run()
 {
     Environment::set($this->environment);
     if (Environment::isDevdesktop()) {
         $this->ensureDevdesktopPath();
     }
     return Result::success($this);
 }
Esempio n. 2
0
 /**
  * Task should be skipped?
  *
  * @return bool
  *   Whether the task should be skipped or not?
  */
 protected function skip()
 {
     // Only update translations outside of Acquia environments.
     // This is currently needed, because the installed Drush version at Acquia
     // does not support this command yet.
     // FIXME Make this command workin in Acquia environments.
     return Environment::isAcquia(Environment::detect());
 }
Esempio n. 3
0
 /**
  * Return task collection for this task.
  *
  * @return \Robo\Collection\Collection
  *   The task collection.
  */
 public function collection()
 {
     $collection = new Collection();
     // Build has to be performed?
     if (Environment::needsBuild($this->environment)) {
         $collection->add(['Initialize.composerInstall' => (new ComposerInstall())->dir(PathResolver::root())->option('optimize-autoloader')]);
     }
     $collection->add(['Initialize.initializeEnvironment' => new \Thunder\Robo\Task\Environment\Initialize($this->environment), 'Initialize.ensureSettingsFile' => new EnsureSettingsFile($this->environment)]);
     return $collection;
 }
Esempio n. 4
0
 /**
  * Return Drush binary path.
  *
  * @return string
  *   The path to the Drush binary.
  */
 public static function drush()
 {
     // Use 'drush8' binary in Acquia environments.
     if (Environment::isAcquia(Environment::detect())) {
         return 'drush8';
     } else {
         if (Environment::isDevdesktop() && isset(self::$devdesktopPath) && file_exists(self::$devdesktopPath . '/tools/drush')) {
             return static::$devdesktopPath . '/tools/drush';
         } else {
             return static::root() . '/bin/drush';
         }
     }
 }
 /**
  * {@inheritdoc}
  */
 protected function skip()
 {
     return parent::skip() || Environment::isAcquia($this->environment);
 }
 /**
  * Creation of database connection details should be skipped?
  *
  * @return bool
  *  Whether the creation of database connection details should be skipped
  */
 protected function skipDatabaseConnection()
 {
     return Environment::isDevdesktop();
 }