Skip to content

Commit

Permalink
DQA-5547: Prepare release 9.2.0. (#602)
Browse files Browse the repository at this point in the history
Co-authored-by: J. João Santos <[email protected]>
  • Loading branch information
joaocsilva and jonhy81 authored Nov 30, 2022
1 parent 7bd8aeb commit 503c03f
Showing 6 changed files with 55 additions and 7 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Toolkit change log

## Version 9.2.0
- DQA-5384: Improve test coverage for toolkit.
- DQA-5102: Set outdated as soft block.
- DQA-5452: Improve recommended check output.
- DQA-5323: Avoid backslash bypass on .opts.yml file review.
- DQA-5323: Website::basicAuth loads SymfonyStyle when not need.
- DQA-5482: Tests for ComponentCheckCommands.
- DQA-5483: PHPunit mock for webservices.
- DQA-5453: Commands maintenance.
- DQA-5456: Hook pre-push replace lint-yaml with test-phpmd.
- DQA-5411: Allow options in the lint commands.
- DQA-5319: Fix ReplaceBlock and add tests.
- DQA-5507: Manifest drupal profile fallback to runner.yml.
- DQA-5319: Move documentation into a branch.
- DQA-5453: Remove usage of deprecated io() & PHPmd.
- DQA-5477: Tests for ToolkitReleaseCommands & changelog-write improvements.
- DQA-5536: PHPStan allow option memory-limit.
- DQA-5546: Set default ASDA as NEXTCLOUD.
- DQA-5453: Documentation & ToolkitRelease.
- DQA-5476: Tests for ToolkitCommands & ConfigurationCommands.
- DQA-5475: Tests for ToolCommands.
- DQA-5474: Tests for TestsCommands.
- DQA-5627: Command opts-review to check bad php_version.

## Version 9.1.1
- DQA-5129: Define timeouts in curl.
- DQA-5409: Fix Commands loaded twice.
2 changes: 1 addition & 1 deletion phpdoc.dist.xml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
<paths>
<output>docs</output>
</paths>
<version number="9.1.1">
<version number="9.2.0">
<folder>latest</folder>
<api>
<source dsn=".">
14 changes: 14 additions & 0 deletions src/TaskRunner/Commands/ReleaseCommands.php
Original file line number Diff line number Diff line change
@@ -56,10 +56,12 @@ public function toolkitVersionWrite(ConsoleIO $io, string $version)
return ResultData::EXITCODE_ERROR;
}
$tasks = [];
// Replace the version in the Toolkit class file.
$tasks[] = $this->taskReplaceInFile('src/Toolkit.php')
->regex("#VERSION = '[^']*'#")
->to("VERSION = '" . $version . "'");

// Replace the version in the phpdoc file.
if (!file_exists('phpdoc.dist.xml')) {
$io->warning('Could not find the file phpdoc.dist.xml, ignoring.');
} else {
@@ -68,6 +70,18 @@ public function toolkitVersionWrite(ConsoleIO $io, string $version)
->to('<version number="' . $version . '">');
}

// Replace the version in the tests files.
if (!file_exists('tests/fixtures/commands/tool.yml')) {
$io->warning('Could not find the file tests/fixtures/commands/tool.yml, ignoring.');
} else {
$tasks[] = $this->taskReplaceInFile('tests/fixtures/commands/tool.yml')
->regex('#Toolkit version OK \([0-9.]+\)#')
->to("Toolkit version OK ($version)");
$tasks[] = $this->taskReplaceInFile('tests/fixtures/commands/tool.yml')
->regex('#Current version: [0-9.]+#')
->to("Current version: $version");
}

return $this->collectionBuilder()->addTaskList($tasks);
}

2 changes: 1 addition & 1 deletion src/Toolkit.php
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ final class Toolkit
/**
* Constant holding the current version.
*/
public const VERSION = '9.1.1';
public const VERSION = '9.2.0';

/**
* Returns the Toolkit root.
12 changes: 11 additions & 1 deletion tests/fixtures/commands/release.yml
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
to: src/Toolkit.php
- from: sample-config.yml
to: phpdoc.dist.xml
- from: sample-config.yml
to: tests/fixtures/commands/tool.yml
expectations:
- contains: |
[Simulator] Simulating File\Replace('src/Toolkit.php')
@@ -25,6 +27,12 @@
[Simulator] Simulating File\Replace('phpdoc.dist.xml')
->regex('#<version number="[^"]*">#')
->to('<version number="9.5.0">')
[Simulator] Simulating File\Replace('tests/fixtures/commands/tool.yml')
->regex('#Toolkit version OK \([0-9.]+\)#')
->to('Toolkit version OK (9.5.0)')
[Simulator] Simulating File\Replace('tests/fixtures/commands/tool.yml')
->regex('#Current version: [0-9.]+#')
->to('Current version: 9.5.0')
- command: 'toolkit:version-write 9.5.0'
configuration: []
@@ -35,6 +43,8 @@
- contains: |
[WARNING] Could not find the file phpdoc.dist.xml, ignoring.
[WARNING] Could not find the file tests/fixtures/commands/tool.yml, ignoring.
[Simulator] Simulating File\Replace('src/Toolkit.php')
->regex('#VERSION = '[^']*'#')
->to('VERSION = '9.5.0'')
@@ -83,7 +93,7 @@
->setBody('## Version 9.6.0
')
')
- command: 'toolkit:changelog-write 9.6.0 --show-pr --show-name --full-link'
configuration: []
8 changes: 4 additions & 4 deletions tests/fixtures/commands/tool.yml
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
----------------- ---------------------
PHP version OK (8.1.12)
Toolkit version OK (9.1.1)
Toolkit version OK (9.2.0)
Drupal version FAIL (not found) ()
----------------- ---------------------
@@ -66,7 +66,7 @@
----------------- -------------
PHP version OK (8.1.12)
Toolkit version OK (9.1.1)
Toolkit version OK (9.2.0)
Drupal version OK (9.4.8)
----------------- -------------
@@ -99,7 +99,7 @@
[WARNING] Failed to get Toolkit version from composer.lock.
Minimum version: ^9.0
Current version: 9.1.1
Current version: 9.2.0
Version check: OK
- command: toolkit:check-version
@@ -112,7 +112,7 @@
> Checking Toolkit version:
Minimum version: ^9.0
Current version: 9.1.1
Current version: 9.2.0
Version check: OK
- command: toolkit:vendor-list

0 comments on commit 503c03f

Please sign in to comment.