Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Account for startup theme #76

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions funcs_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,13 @@ function current_branch_cms_major(
) {
global $MODULE_DIR, $GITHUB_REF;

// This repo matches every major and matches start at the lowest - but we only want the highest stable.
// This repo matched multiple majors and matches start at the lowest - but we only want it for its highest supported one.
if ($GITHUB_REF === 'silverstripe/silverstripe-simple') {
return '5';
}

// This repo matches multiple majors and matches start at the lowest - but we only want the highest stable.
if ($GITHUB_REF === 'silverstripe/startup-theme') {
return MetaData::HIGHEST_STABLE_CMS_MAJOR;
}

Expand Down Expand Up @@ -388,8 +393,9 @@ function setup_directories($input, $dirs = [DATA_DIR, MODULES_DIR]) {

function filtered_modules($cmsMajor, $input)
{
$allRepoData = MetaData::getAllRepositoryMetaData(false);
$repos = MetaData::removeReposNotInCmsMajor(
MetaData::getAllRepositoryMetaData(false),
$allRepoData,
$cmsMajor,
// For repositories that only have a single support branch such as gha-generate-matrix, only include
// them when updating the currently supported CMS major.
Expand All @@ -399,7 +405,7 @@ function filtered_modules($cmsMajor, $input)
if ($input->hasOption('unsupported-default-branch') && $input->getOption('unsupported-default-branch')) {
$prevCmsMajor = $cmsMajor - 1;
$prevCmsRepos = MetaData::removeReposNotInCmsMajor(
MetaData::getAllRepositoryMetaData(false),
$allRepoData,
$prevCmsMajor,
false
);
Expand Down