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

Make is_module()and similar methods dynamic and more robust #4

Closed
emteknetnz opened this issue Aug 14, 2023 · 0 comments
Closed

Make is_module()and similar methods dynamic and more robust #4

emteknetnz opened this issue Aug 14, 2023 · 0 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Aug 14, 2023

Currently is_module() uses a hardcoded list

It should be made to be dynamic by looking at composer.json as mentioned here

You'll need to adjust the logic accordingly. Probably best would be to check if there's a composer.json file. If no composer, it's not a module. Then you can check the type key in composer.json for silverstripe-vendormodule, silverstripe-module (can skip this one if you like, it was the ss3 type), silverstripe-theme, and silverstripe-recipe

We should also adjust module_is_recipe at the same time so it's looking for silverstripe-recipe in composer.json, and is_gha_repository to check first !is_module()

PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants