Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Nov 11, 2020
1 parent 96dfc6c commit c7542ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 7 additions & 1 deletion docs/recipe/deploy/vendors.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [`composer_action`](#composer_action)
* [`composer_options`](#composer_options)
* [`composer_version`](#composer_version)
* [`composer_channel`](#composer_channel)
* Tasks
* [`deploy:vendors`](#deployvendors) — Installing vendors

Expand All @@ -37,10 +38,15 @@ For example:
set('composer_version', '10.10.15')
```

### composer_channel
[Source](/recipe/deploy/vendors.php#L23)

Set this variable to stable, snapshot, preview, 1 or 2 to select which Composer channel to use


## Tasks
### deploy:vendors
[Source](/recipe/deploy/vendors.php#L42)
[Source](/recipe/deploy/vendors.php#L54)



11 changes: 5 additions & 6 deletions recipe/deploy/vendors.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@

if ($composerVersionToInstall) {
$installCommand .= " -- --version=" . $composerVersionToInstall;
}
elseif ($composerChannel) {
$composerValidChannels = ['stable', 'snapshot', 'preview', '1', '2', ];
if(!in_array($composerChannel, $composerValidChannels)) {
throw new \Exception('Selected Composer channel '.$composerChannel.' is not valid. Valid channels are: '.implode(', ', $composerValidChannels));
} elseif ($composerChannel) {
$composerValidChannels = ['stable', 'snapshot', 'preview', '1', '2',];
if (!in_array($composerChannel, $composerValidChannels)) {
throw new \Exception('Selected Composer channel ' . $composerChannel . ' is not valid. Valid channels are: ' . implode(', ', $composerValidChannels));
}
$installCommand .= " -- --".$composerChannel;
$installCommand .= " -- --" . $composerChannel;
}

run($installCommand);
Expand Down

0 comments on commit c7542ec

Please sign in to comment.