Add Drupal application
This commit is contained in:
parent
c00b769d67
commit
4bb39011f3
261 changed files with 22997 additions and 0 deletions
drupal/drush
38
drupal/drush/Commands/PolicyCommands.php
Normal file
38
drupal/drush/Commands/PolicyCommands.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Drush\Commands;
|
||||
|
||||
use Consolidation\AnnotatedCommand\CommandData;
|
||||
|
||||
/**
|
||||
* Edit this file to reflect your organization's needs.
|
||||
*/
|
||||
class PolicyCommands extends DrushCommands {
|
||||
|
||||
/**
|
||||
* Prevent catastrophic braino. Note that this file has to be local to the
|
||||
* machine that initiates the sql:sync command.
|
||||
*
|
||||
* @hook validate sql:sync
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function sqlSyncValidate(CommandData $commandData) {
|
||||
if ($commandData->input()->getArgument('target') == '@prod') {
|
||||
throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__]));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit rsync operations to production site.
|
||||
*
|
||||
* @hook validate core:rsync
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function rsyncValidate(CommandData $commandData) {
|
||||
if (preg_match("/^@prod/", $commandData->input()->getArgument('target'))) {
|
||||
throw new \Exception(dt('Per !file, you may never rsync to the production site.', ['!file' => __FILE__]));
|
||||
}
|
||||
}
|
||||
}
|
1
drupal/drush/README.md
Normal file
1
drupal/drush/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
This directory contains commands, configuration and site aliases for Drush. See https://packagist.org/search/?type=drupal-drush for a directory of Drush commands installable via Composer.
|
6
drupal/drush/drush.yml
Normal file
6
drupal/drush/drush.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
#
|
||||
# A Drush configuration file
|
||||
#
|
||||
# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml
|
||||
#
|
||||
# Edit or remove this file as needed.
|
14
drupal/drush/sites/self.site.yml
Normal file
14
drupal/drush/sites/self.site.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Edit or remove this file as needed.
|
||||
# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.site.yml
|
||||
|
||||
#prod:
|
||||
# host: prod.domain.com
|
||||
# user: www-admin
|
||||
# root: /path/to/drupal
|
||||
# uri: http://www.example.com
|
||||
#
|
||||
#stage:
|
||||
# host: stage.domain.com
|
||||
# user: www-admin
|
||||
# root: /path/to/drupal
|
||||
# uri: http://stage.example.com
|
Loading…
Add table
Add a link
Reference in a new issue