Skip to content
Snippets Groups Projects
Commit 9f3fc112 authored by jurgenhaas's avatar jurgenhaas
Browse files

#3 Configurable username for drupal.org

parent 5fb98ae9
No related branches found
Tags v0.2.0
No related merge requests found
Pipeline #
......@@ -10,7 +10,6 @@ Here is a sample of what to add to your composer.json:
{
"extra": {
"dorgflow": {
"username": "jurgenhaas",
"projects": {
"drupal/colorbox_field_formatter": "8.x-1.x",
"drupal/dimension": "8.x-1.x",
......@@ -22,4 +21,4 @@ Here is a sample of what to add to your composer.json:
}
```
The, to gat it to work, simply call `composer require lakedrops/dorgflow` and everything will be traken care off for you automatically - even if you update your Drupal project at any time in the future, the development environments for your defined projects will be kept in place and properly configured.
Then, to get it to work, simply call `composer require lakedrops/dorgflow` and everything will be traken care off for you automatically - even if you update your Drupal project at any time in the future, the development environments for your defined projects will be kept in place and properly configured.
......@@ -26,6 +26,7 @@
"require": {
"composer-plugin-api": "^1.0.0",
"cypresslab/gitelephant": "~1.0",
"lakedrops/dotenv": "^0.1",
"php": ">=5.4.5"
},
"autoload": {
......
......@@ -7,6 +7,7 @@ use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Script\Event as ScriptEvent;
use GitElephant\Repository;
use LakeDrops\Component\Dotenv\Dotenv;
use Symfony\Component\Filesystem\Filesystem;
class Handler {
......@@ -76,10 +77,11 @@ class Handler {
* @return array
*/
protected function getOptions() {
$env = new Dotenv('dorgflow', $this->io);
$extra = $this->composer->getPackage()->getExtra() + ['dorgflow' => []];
$options = $extra['dorgflow'] + [
'projects' => [],
'username' => '',
'username' => $env->receive('drupal_org_username', 'Drupal.org username', getenv('USER')),
];
return $options;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment