Skip to content

Create a way for the launcher to "update" an existing Drupal CMS site #97

@phenaproxima

Description

@phenaproxima

There are times when Drupal CMS makes a change to its project template. Those kinds of changes are not updateable -- sites have to go change their composer.json manually (or at least by running some Composer commands).

For some of these things -- like when we introduced recipe unpacking support -- we really should be updating launcher-started sites too. That presents a problem, which is that launcher users cannot ever be expected to look at a command line. So it's up to the launcher to do it.

What we should do, I think, is introduce a concept of versions. Each version is just an integer. All launcher sites created up to this point are at version 0. A single version consists of a series of Composer commands. The current version should be stored in composer.json under extra.drupal-launcher.version.

When the launcher starts and Drupal CMS is already installed, it should automatically run whatever Composer commands are needed to bring its version up to the current one. The versions themselves, and the commands needed to bring an existing project to each version, should be hard-coded into the launcher (at least for now). The launcher should run these commands, then update the stored version in composer.json. This would allow us to ship updates not just to the launcher, but also to the project that the launcher manages.

If Drupal CMS is not installed when the launcher starts, then it creates the project and sets its version to whatever the highest defined version is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions