src/Robo/Commands/Deploy/DeployCommand.php
public function deploy($options = [
    'branch' => InputOption::VALUE_REQUIRED,
    'tag' => InputOption::VALUE_REQUIRED,
    'commit-msg' => InputOption::VALUE_REQUIRED,
    'ignore-dirty' => FALSE,
    'dry-run' => FALSE,
    'ignore-platform-reqs' => FALSE,
  ]) {
    if ($options['dry-run']) {
      $this->logger->warning("This will be a dry run, the artifact will not be pushed.");
    }
    $this->checkDirty($options);

    if (isset($options['ignore-platform-reqs'])) {
      $this->ignorePlatformReqs = $options['ignore-platform-reqs'];
    }

    if (!$options['tag'] && !$options['branch']) {
      $this->createTag = $this->confirm("Would you like to create a tag?", $this->createTag);
    }
    $this->commitMessage = $this->getCommitMessage($options);

    if ($options['tag'] || $this->createTag) {
      // Warn if they're creating a tag and we won't tag the source for them.
      if (!$this->tagSource) {
        $this->say("Config option deploy.tag_source if FALSE. The source repo will not be tagged.");
      }
      $this->deployToTag($options);
    }
    else {
      $this->deployToBranch($options);
    }
  }
public function deploy($options = [
    'branch' => InputOption::VALUE_REQUIRED,
    'tag' => InputOption::VALUE_REQUIRED,
    'commit-msg' => InputOption::VALUE_REQUIRED,
    'ignore-dirty' => FALSE,
    'dry-run' => FALSE,
    'ignore-platform-reqs' => FALSE,
  ]) {
    if ($options['dry-run']) {
      $this->logger->warning("This will be a dry run, the artifact will not be pushed.");
    }
    $this->checkDirty($options);

    if (isset($options['ignore-platform-reqs'])) {
      $this->ignorePlatformReqs = $options['ignore-platform-reqs'];
    }

    if (!$options['tag'] && !$options['branch']) {
      $this->createTag = $this->confirm("Would you like to create a tag?", $this->createTag);
    }
    $this->commitMessage = $this->getCommitMessage($options);

    if ($options['tag'] || $this->createTag) {
      // Warn if they're creating a tag and we won't tag the source for them.
      if (!$this->tagSource) {
        $this->say("Config option deploy.tag_source if FALSE. The source repo will not be tagged.");
      }
      $this->deployToTag($options);
    }
    else {
      $this->deployToBranch($options);
    }
  }
public function deploy ( $ options = [ 'branch' => InputOption :: VALUE_REQUIRED , 'tag' => InputOption :: VALUE_REQUIRED , 'commit-msg' => InputOption :: VALUE_REQUIRED , 'ignore-dirty' => FALSE , 'dry-run' => FALSE , 'ignore-platform-reqs' => FALSE , ] ) { if ( $ options [ 'dry-run' ] ) { $ this -> logger -> warning ( "This will be a dry run, the artifact will not be pushed." ) ; } $ this -> checkDirty ( $ options ) ; if ( isset ( $ options [ 'ignore-platform-reqs' ] ) ) { $ this -> ignorePlatformReqs = $ options [ 'ignore-platform-reqs' ] ; } if ( ! $ options [ 'tag' ] && ! $ options [ 'branch' ] ) { $ this -> createTag = $ this -> confirm ( "Would you like to create a tag?" , $ this -> createTag ) ; } $ this -> commitMessage = $ this -> getCommitMessage ( $ options ) ; if ( $ options [ 'tag' ] || $ this -> createTag ) { // Warn if they're creating a tag and we won't tag the source for them. if ( ! $ this -> tagSource ) { $ this -> say ( "Config option deploy.tag_source if FALSE. The source repo will not be tagged." ) ; } $ this -> deployToTag ( $ options ) ; } else { $ this -> deployToBranch ( $ options ) ; } }
Builds separate artifact and pushes to git.remotes defined blt.yml.

@command artifact:deploy

@aliases ad deploy

@validateGitConfig

@param array $options
Options that can be passed via the CLI.
@throws BltException
Builds separate artifact and pushes to git . remotes defined blt . yml .