Skip to content

Commit

Permalink
New constant: RoboFile::CONFIRM_CONFIG_BEFORE_DEPLOY
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Dargham committed Sep 3, 2021
1 parent 30567b2 commit 6f4ed0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/DeployTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ trait DeployTrait
public function deploy($environment, $gitRevision, $options = ['ignore-assets' => false])
{
$this->io()->title('Deploy version ' . $gitRevision . ' to ' . $environment);
$this->io()->text('You must answer a few questions about the remote environment:');

$this->configure($environment);
if (!file_exists($this->fileVarsLocal($environment)) || \RoboFile::CONFIRM_CONFIG_BEFORE_DEPLOY) {
$this->io()->text('You must answer a few questions about the remote environment:');
$this->configure($environment, ['only-missing' => false]);
} else {
$this->configure($environment, ['only-missing' => true]);
}

$config = $this->getConfig($environment);
$collection = $this->collectionBuilder();
Expand Down

0 comments on commit 6f4ed0c

Please sign in to comment.