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

FIX Don't include installer for non-modules #89

Conversation

GuySartorelli
Copy link
Member

Looks like I got this the wrong way around - if we have any data in the repositories.json file for a repo, we were adding installer for it (even if it shouldn't have installer)!

Now we're only adding installer for repos which need it - either because they explicitly need it, or because we can see from their composer package type that they're a Silverstripe CMS module

Issue

@GuySartorelli GuySartorelli changed the base branch from 1 to 1.14 May 8, 2024 00:49
@GuySartorelli GuySartorelli force-pushed the pulls/1.14/no-installer-for-cow branch from 715250d to 9eb226a Compare May 8, 2024 01:11
Comment on lines -138 to +148
['myaccount/recipe-cms', '4', ''],
['myaccount/recipe-cms', '4.10', ''],
['myaccount/recipe-cms', 'burger', ''],
['myaccount/recipe-cms', 'pulls/4/myfeature', ''],
['myaccount/recipe-cms', 'pulls/4.10/myfeature', ''],
['myaccount/recipe-cms', 'pulls/burger/myfeature', ''],
['myaccount/recipe-cms', '5', ''],
['myaccount/recipe-cms', '5.1', ''],
['myaccount/recipe-cms', '6', ''],
['myaccount/recipe-cms', '6.0', ''],
'recipe-cms1' => ['myaccount/recipe-cms', '4', ''],
'recipe-cms2' => ['myaccount/recipe-cms', '4.10', ''],
'recipe-cms3' => ['myaccount/recipe-cms', 'burger', ''],
'recipe-cms4' => ['myaccount/recipe-cms', 'pulls/4/myfeature', ''],
'recipe-cms5' => ['myaccount/recipe-cms', 'pulls/4.10/myfeature', ''],
'recipe-cms6' => ['myaccount/recipe-cms', 'pulls/burger/myfeature', ''],
'recipe-cms7' => ['myaccount/recipe-cms', '5', ''],
'recipe-cms8' => ['myaccount/recipe-cms', '5.1', ''],
'recipe-cms9' => ['myaccount/recipe-cms', '6', ''],
'recipe-cms10' => ['myaccount/recipe-cms', '6.0', ''],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding keys to these and others below was to make it easier to see what was failing while debugging this PR - I decided to keep these in so future debugging is similarly easy

Comment on lines 191 to 201
// random third-party repo
'random1' => ['myaccount/my-module', '4.0', '', [['name' => '6']], ['silverstripe/framework' => '^6']],
'random2' => ['myaccount/my-module', '4.0', '6.x-dev', [['name' => '6']], ['silverstripe/framework' => '^6'], 'silverstripe-module'],
'random3' => ['myaccount/my-module', '4.0', '6.x-dev', [['name' => '6']], ['silverstripe/framework' => '^6'], 'silverstripe-vendormodule'],
'random4' => ['myaccount/my-module', '4.0', '6.x-dev', [['name' => '6']], ['silverstripe/framework' => '^6'], 'silverstripe-recipe'],
'random5' => ['myaccount/my-module', '4.0', '6.x-dev', [['name' => '6']], ['silverstripe/framework' => '^6'], 'silverstripe-theme'],
'random6' => ['myaccount/my-module', '4.0', '', [['name' => '6']]],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing that the type of package does matter - regular repos don't have any type, and so they don't get installer.

@GuySartorelli GuySartorelli force-pushed the pulls/1.14/no-installer-for-cow branch from 9eb226a to 78acf55 Compare May 8, 2024 01:19
tests/JobCreatorTest.php Outdated Show resolved Hide resolved
tests/JobCreatorTest.php Outdated Show resolved Hide resolved
@GuySartorelli GuySartorelli force-pushed the pulls/1.14/no-installer-for-cow branch from 78acf55 to 678b5b3 Compare May 8, 2024 01:47
@emteknetnz emteknetnz merged commit b2625a3 into silverstripe:1.14 May 8, 2024
4 checks passed
@emteknetnz emteknetnz deleted the pulls/1.14/no-installer-for-cow branch May 8, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants