Skip to content
Snippets Groups Projects
Commit 6c76f403 authored by jurgenhaas's avatar jurgenhaas
Browse files

#5 Remove drupal.org username as the git URLs are changing and SSH pub key...

#5 Remove drupal.org username as the git URLs are changing and SSH pub key authentication is now required
parent 700178d1
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
"require": { "require": {
"composer-plugin-api": "^1.0.0", "composer-plugin-api": "^1.0.0",
"cypresslab/gitelephant": "~1.0", "cypresslab/gitelephant": "~1.0",
"lakedrops/dotenv": "^0.1",
"php": ">=5.6" "php": ">=5.6"
}, },
"require-dev": { "require-dev": {
......
...@@ -6,7 +6,6 @@ use Composer\Composer; ...@@ -6,7 +6,6 @@ use Composer\Composer;
use Composer\IO\IOInterface; use Composer\IO\IOInterface;
use Composer\Script\Event; use Composer\Script\Event;
use GitElephant\Repository; use GitElephant\Repository;
use LakeDrops\Component\Dotenv\Dotenv;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
/** /**
...@@ -84,7 +83,7 @@ class Handler { ...@@ -84,7 +83,7 @@ class Handler {
$path = $installationManager->getInstallPath($package); $path = $installationManager->getInstallPath($package);
$this->io->write("- $project => $path", TRUE); $this->io->write("- $project => $path", TRUE);
$this->prepareWorkingDirectory($path, $project, $version, $options['username']); $this->prepareWorkingDirectory($path, $project, $version);
} }
} }
...@@ -95,13 +94,10 @@ class Handler { ...@@ -95,13 +94,10 @@ class Handler {
* The options. * The options.
*/ */
protected function getOptions() { protected function getOptions() {
$env = new Dotenv('dorgflow', $this->io);
$extra = $this->composer->getPackage()->getExtra() + ['dorgflow' => []]; $extra = $this->composer->getPackage()->getExtra() + ['dorgflow' => []];
$options = $extra['dorgflow'] + [ return $extra['dorgflow'] + [
'projects' => [], 'projects' => [],
'username' => $env->receive('drupal_org_username', 'Drupal.org username', getenv('USER')),
]; ];
return $options;
} }
/** /**
...@@ -113,12 +109,10 @@ class Handler { ...@@ -113,12 +109,10 @@ class Handler {
* Name of the project. * Name of the project.
* @param string $version * @param string $version
* Version to checkout. * Version to checkout.
* @param string $username
* Username on drupal.org.
*/ */
protected function prepareWorkingDirectory($path, $project, $version, $username) { protected function prepareWorkingDirectory($path, $project, $version) {
list(, $projectname) = explode('/', $project); list(, $projectname) = explode('/', $project);
$uri = $username . '@git.drupal.org:project/' . $projectname . '.git'; $uri = 'git@git.drupal.org:project/' . $projectname . '.git';
// Git Clone the repository into the working directory. // Git Clone the repository into the working directory.
$repository = Repository::open($path); $repository = Repository::open($path);
......
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