/**
  * {@inheritdoc}
  *
  * @throws BuildException
  *
  * @return void
  */
 protected function validate()
 {
     parent::validate();
     if ($this->descriptor === null) {
         throw new BuildException('The package descriptor file have to be set.');
     }
     $this->arguments .= $this->descriptor;
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  *
  * @return void
  *
  * @throws BuildException
  */
 protected function validate()
 {
     if ($this->descriptor === null || $this->scripts === null || $this->package === null) {
         throw new BuildException('The deployment tool needs at least the project descriptor, ' . 'the scripts folder and package folder to be set.');
     } elseif ($this->lint !== false && $this->phpbin === null) {
         throw new BuildException('You set the lint option but not the path to the php executable.');
     }
     parent::validate();
     if ($this->lint !== false) {
         $this->arguments .= '--lint ';
     }
     if ($this->source !== null) {
         $this->arguments .= "--src-dir={$this->source} ";
     }
     if ($this->output !== null) {
         $this->arguments .= "--output-dir={$this->output} ";
     }
     if ($this->phpbin !== null) {
         $this->arguments .= "--php-exe={$this->phpbin} ";
     }
     $this->arguments .= "--scripts-dir={$this->scripts} ";
     $this->arguments .= "--package-descriptor={$this->descriptor} ";
     $this->arguments .= $this->package;
 }