symbiote / silverstripe-build

Phing build settings and tasks for the silverstripe-base project
BSD 3-Clause "New" or "Revised" License
0 stars 8 forks source link

Replace hardcoded occurences of mysite with phing property. #34

Closed MasonD closed 5 years ago

MasonD commented 5 years ago

Silverstripe 4 allows an arbitrary name for this folder. This pull request allows a project with a non-mysite project code root to configure this with the project.root phing property.

Special care has been made to ensure that everything works the same as it used to if the configuration isn't changed.

nglasl commented 5 years ago

Thanks @MasonD, this is great. The only thing that jumps out to me is that our base project still contains mysite https://github.com/symbiote/silverstripe-base. That also has a few scripts and things under it that need consideration when moving away from mysite. @nyeholt is there anything specific that jumps out to you with these changes, and is changing mysite in the base feasible?

MasonD commented 5 years ago

To maintain backwards-compatibility with previous projects, I decided on a default project.root of mysite. These changes should still work with the base project if it keeps mysite, but if base changes to app, then perhaps we'll need to change the default here to app? This would break existing projects using silverstripe-build if they were to update.

MasonD commented 5 years ago

There's the possibility of dynamically generating build.properites from build.properties.sample in the same way that the configs are created in the default_configs target, in which case project.root could default automatically to whichever of mysite or app are present, while still giving the ability to change it manually by providing it via -Dproject.root or editing build.properties.

nglasl commented 5 years ago

Yeah the backwards compatibility here is good, but I'm thinking we just make it app and give this module a major version bump. Then we change base from mysite to app (assuming there's no issues in doing so). I feel like this needs to be done at some point anyway since it's now the go-to naming convention https://docs.silverstripe.org/en/4/changelogs/4.2.0/#app-folder-name. Also related https://github.com/symbiote/silverstripe-build/issues/29.

MasonD commented 5 years ago

Is there anything I can do to move this forward, or are we waiting on input from nyeholt?