Skip to content

Commit

Permalink
Merge pull request #80 from creative-commoners/pulls/1.12/behat-serve
Browse files Browse the repository at this point in the history
FIX Use installer for silverstripe/serve and silverstripe/behat-exten…
  • Loading branch information
GuySartorelli authored Jan 31, 2024
2 parents d2fb178 + d200dc4 commit f166409
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions consts.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
'silverstripe-config',
];

// Repositories that either don't have a composer type or have a weird composer type, though we still want installer
const FORCE_INSTALLER_UNLOCKEDSTEPPED_REPOS = [
'silverstripe-behat-extension',
'silverstripe-serve',
];

const CMS_TO_REPO_MAJOR_VERSIONS = [
'4' => [
'recipe-authoring-tools' => '1',
Expand Down
4 changes: 3 additions & 1 deletion job_creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public function getInstallerVersion(): string
'silverstripe-recipe',
'silverstripe-theme',
];
if (!isset($json->type) || !in_array($json->type, $silverstripeRepoTypes)) {
if ((!isset($json->type) || !in_array($json->type, $silverstripeRepoTypes)
&& !in_array($this->repoName, FORCE_INSTALLER_UNLOCKEDSTEPPED_REPOS)
)) {
return '';
}
// has a lockstepped .x-dev requirement in composer.json
Expand Down
3 changes: 3 additions & 0 deletions tests/JobCreatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ public function provideGetInstallerVersion(): array
['myaccount/silverstripe-html5', '2.3', '4.10.x-dev'],
['myaccount/silverstripe-html5', '2.4', '4.11.x-dev'],
['myaccount/silverstripe-html5', 'burger', $currentMinor],
// force installer unlockedstepped repo
['myaccount/silverstripe-serve', '2', $nextMinor],
['myaccount/silverstripe-behat-extension', '2', $nextMinor],
];
}

Expand Down

0 comments on commit f166409

Please sign in to comment.