-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.0.0-alpha11'
- Loading branch information
Showing
17 changed files
with
370 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# NAME | ||
# before_script.sh - Display details about the fixture. | ||
# | ||
# SYNOPSIS | ||
# before_script.sh | ||
# | ||
# DESCRIPTION | ||
# Displays information about installed Composer packages and Drupal | ||
# projects. | ||
|
||
cd "$(dirname "$0")"; source _includes.sh | ||
|
||
# Exit early in the absence of a fixture. | ||
[[ -d "$ORCA_FIXTURE_DIR" ]] || exit 0 | ||
|
||
# Display installed Composer packages. | ||
composer -d${ORCA_FIXTURE_DIR} show | ||
|
||
# Display the list of available Drupal extensions (modules and themes). | ||
drush --no-ansi pm:list || true | ||
|
||
# Display basic Drupal site details. | ||
drush core-status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# NAME | ||
# script.sh - Run ORCA tests | ||
# script.sh - Run ORCA tests. | ||
# | ||
# SYNOPSIS | ||
# script.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.0.0-alpha10 | ||
v1.0.0-alpha11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?php | ||
|
||
namespace Acquia\Orca\Command\Debug; | ||
|
||
use Acquia\Orca\Command\Fixture\FixtureInitCommand; | ||
use Acquia\Orca\Command\StatusCodes; | ||
use Acquia\Orca\Utility\DrupalCoreVersionFinder; | ||
use Acquia\Orca\Utility\StatusTable; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Provides a command. | ||
*/ | ||
class DebugCoreVersionsCommand extends Command { | ||
|
||
/** | ||
* The default command name. | ||
* | ||
* @var string | ||
*/ | ||
protected static $defaultName = 'debug:core-versions'; | ||
|
||
/** | ||
* The Drupal core version finder. | ||
* | ||
* @var \Acquia\Orca\Utility\DrupalCoreVersionFinder | ||
*/ | ||
private $drupalCoreVersionFinder; | ||
|
||
/** | ||
* Constructs an instance. | ||
* | ||
* @param \Acquia\Orca\Utility\DrupalCoreVersionFinder $drupal_core_version_finder | ||
* The Drupal core version finder. | ||
*/ | ||
public function __construct(DrupalCoreVersionFinder $drupal_core_version_finder) { | ||
$this->drupalCoreVersionFinder = $drupal_core_version_finder; | ||
parent::__construct(self::$defaultName); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function configure() { | ||
$this | ||
->setAliases(['core']) | ||
->setDescription('Provides an overview of Drupal Core versions'); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function execute(InputInterface $input, OutputInterface $output): int { | ||
$output->writeln('Getting version data via Composer. This takes a while.'); | ||
|
||
$overview = [ | ||
$this->getRow(FixtureInitCommand::PREVIOUS_RELEASE), | ||
$this->getRow(FixtureInitCommand::PREVIOUS_DEV), | ||
$this->getRow(FixtureInitCommand::CURRENT_RECOMMENDED), | ||
$this->getRow(FixtureInitCommand::CURRENT_DEV), | ||
$this->getRow(FixtureInitCommand::NEXT_RELEASE), | ||
$this->getRow(FixtureInitCommand::NEXT_DEV), | ||
]; | ||
|
||
(new StatusTable($output)) | ||
->setRows($overview) | ||
->render(); | ||
return StatusCodes::OK; | ||
} | ||
|
||
/** | ||
* Gets a table row for a given version constant. | ||
* | ||
* @param string $version_constant | ||
* The version constant. | ||
* | ||
* @return array | ||
* A table row. | ||
*/ | ||
private function getRow(string $version_constant): array { | ||
$row = [$version_constant]; | ||
try { | ||
switch ($version_constant) { | ||
case FixtureInitCommand::PREVIOUS_RELEASE: | ||
$row[] = $this->drupalCoreVersionFinder->getPreviousMinorRelease(); | ||
break; | ||
|
||
case FixtureInitCommand::PREVIOUS_DEV: | ||
$row[] = $this->drupalCoreVersionFinder->getPreviousDevVersion(); | ||
break; | ||
|
||
case FixtureInitCommand::CURRENT_RECOMMENDED: | ||
$row[] = $this->drupalCoreVersionFinder->getCurrentRecommendedRelease(); | ||
break; | ||
|
||
case FixtureInitCommand::CURRENT_DEV: | ||
$row[] = $this->drupalCoreVersionFinder->getCurrentDevVersion(); | ||
break; | ||
|
||
case FixtureInitCommand::NEXT_RELEASE: | ||
$row[] = $this->drupalCoreVersionFinder->getNextRelease(); | ||
break; | ||
|
||
case FixtureInitCommand::NEXT_DEV: | ||
$row[] = $this->drupalCoreVersionFinder->getNextDevVersion(); | ||
break; | ||
} | ||
} | ||
catch (\RuntimeException $e) { | ||
$row[] = '~'; | ||
} | ||
return $row; | ||
} | ||
|
||
} |
Oops, something went wrong.