File tree Expand file tree Collapse file tree 5 files changed +76
-0
lines changed
Expand file tree Collapse file tree 5 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ # Usage: drupal site:build --placeholder="name:subscriptions"
2+ command :
3+ name : site:build
4+ description : ' Builds a site.'
5+ commands :
6+ # We must ensure we run this command first in all chains to setup our console environment.
7+ - command : site:base:setup
8+ arguments :
9+ name : ' %{{name}}'
10+ # Checkout site
11+ - command : site:checkout
12+ arguments :
13+ name : ' %{{name}}'
14+ options :
15+ branch : ' %{{branch|8.x}}'
16+ # Run site:rebuild
17+ - command : site:rebuild
18+ options :
19+ placeholder :
20+ - ' name:%{{name}}'
21+
22+ - command : exec
23+ arguments :
24+ bin : ' drupal site:build:${{env}} --placeholder="name=%{{name}}";'
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ command:
33 name : site:test
44 description : ' Sets the test suites up and then runs them.'
55commands :
6+ # We must ensure we run this command first in all chains to setup our console environment.
7+ - command : site:base:setup
8+ arguments :
9+ name : ' %{{name}}'
610# Set up testing suites
711 - command : site:test:setup
812 arguments :
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ command:
33 name : site:update
44 description : ' Sets the site up based on current configuration and database.'
55commands :
6+ # We must ensure we run this command first in all chains to setup our console environment.
7+ - command : site:base:setup
8+ arguments :
9+ name : ' %{{name}}'
610# Set default drush alias.
711 - command : exec
812 arguments :
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ application:
22 autowire :
33 commands :
44 forced :
5+ ' site:base:setup ' :
6+ class : \DennisDigital\Drupal\Console\Command\SiteSetupCommand
57 ' site:checkout ' :
68 class : \DennisDigital\Drupal\Console\Command\SiteCheckoutCommand
79 ' site:compose ' :
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * @file
5+ * Contains \DennisDigital\Drupal\Console\Command\SiteSetupCommand.
6+ *
7+ * Sets up the necessary site variables.
8+ */
9+
10+ namespace DennisDigital \Drupal \Console \Command ;
11+
12+ use Symfony \Component \Console \Input \InputInterface ;
13+ use Symfony \Component \Console \Output \OutputInterface ;
14+ use DennisDigital \Drupal \Console \Exception \SiteCommandException ;
15+
16+ /**
17+ * Class SiteSetupCommand
18+ *
19+ * @package DennisDigital\Drupal\Console\Command
20+ */
21+ class SiteSetupCommand extends SiteBaseCommand {
22+
23+ /**
24+ * {@inheritdoc}
25+ */
26+ protected function configure () {
27+ parent ::configure ();
28+
29+ $ this ->setName ('site:base:setup ' )
30+ // @todo use: ->setDescription($this->trans('commands.site.compose.description'))
31+ ->setDescription ('Sets up the necessary site variables. ' );
32+ }
33+
34+ /**
35+ * {@inheritdoc}
36+ */
37+ protected function execute (InputInterface $ input , OutputInterface $ output ) {
38+ parent ::execute ($ input , $ output );
39+
40+ $ this ->io ->success ('Stuff works. ' );
41+ }
42+ }
You can’t perform that action at this time.
0 commit comments