-
Notifications
You must be signed in to change notification settings - Fork 19
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
Update Command - Multisite shared modules are replaced by site specific #299
Comments
@yorkshire-pudding I think it would be a good idea to allow updating a module in just one site even if the module already exists in the shared modules folder. That way you can specify a different version if one site requires it. We should still stop it from deleting the module from the shared modules folder. |
Thanks @hosef - yes I could see that being very useful for multi site owners. |
@hosef - I don't think this PR is working as it probably needs to. I think to meet the scenario above there should probably be an option for the update command to update a site only as I think the default should be to update the shared. I tried to do it how I might normally do it in the test install.
Expected result Actual result
Perhaps something like this: Scenario - module exists in shared and does not exist in site Scenario - module exists in shared and does not exist in site Scenario - module exists in shared and also exists in site module folder Scenario - module exists in shared and also exists in site module folder Scenario - module exists in shared and also exists in site module folder Scenario - module exists in shared and does not exist in site Scenario - module exists in site and does not exist in shared As an aside, I think we need to separate the changes to download.bee.inc and do those first against |
Ok, I tried to convert the scenarios into a more tabular form so it's easier to scan.
All of those make sense, but there is one that was not addressed. What should happen when it exists in both locations and the multisite flag is not specified? As for the download command, I think that it would be a good idea to make a more generic download function that has options passed into it instead of accessing global variables or command line arguments directly. Off the top of my head, I think it would need: project name, download destination, version, if it should replace an existing version, if it should make a backup of the project. While we are at it, we should have other functions that handle getting paths and handling version info. We could then make all the commands that need to download projects wrap these other functions so that they behave consistently. |
If the module exists in both locations then the one that is active is the 'site' one on that site, so one argument could be to just to that. Another approach, as we haven't specified an option is to update both. I think the first approach is perhaps more what people would expect.
I've created a separate issue for that: #348 |
This is a subtask of #111 and relates to the issue-111-update-command branch.
Steps to reproduce
bee --site=site_name update
Expected result
Module is updated in current location
Actual result
Module is deleted from shared module folder and installed in the site specific module folder.
The cause of this is using the
download_bee_callback
which when invoked with thesite
option will download to the site folder.I think we should fix this at the same time as #297
The text was updated successfully, but these errors were encountered: