The backend is relatively easy to update due to the fact that it is one maintained system (Craft). The frontend on the other hand is a combination of frameworks and tools. This makes it more difficult to make this upgradable. But to keep all our project up-to-date on the frontend-side, we have the need for an updater.
Some first ideas
Let's make a node application to handle the updates. This will be integrated in the baseinstall. And this will update itself if needed.
The updater should be driven by .json files with all the changes that need to be made.
The updater should connect to the master git branch of the baseinstall and check if there are newer update files.
A possible flow:
Check if there are no changed files in the repo. If so, first commit them. This gives you a clear overview of all changed files after the update.
Check if there are newer update files on the master branch of the baseinstall
Download these files.
Execute all the changes described in the file.
Open up the changelog of that update in the browser. For some updates, there will be the need of some manual changes. This can be described in the changelog.
Check all changed files. Do for some critical file a history compare to make sure you are not overwriting crittical code.
Check if everything still works
Commit the update.
What the update file should facilitate:
Overwrite files from the master branch of the baseinstall. This is mainly for files like the javascript components.
Find and replace code in a specific file using regex
Find and replace code across all template files using regex
Download some newly added files.
...
Extra
Make a cleanup function to clean up some example files like the jsplugin folder.
Also remove this path in the tailwind.config.
And remove the source files and the doc files from the updater.
⚠️ This cleanup should not work when run in the baseinstall itself.
Testing?
Take screenshots of all pages based on the sitemap of the site before the upgrade.
Take screenshots after the update
do a diff on the screenshots to see if the upgrade breaks something.
Phoenix AKA frontend updater
The backend is relatively easy to update due to the fact that it is one maintained system (Craft). The frontend on the other hand is a combination of frameworks and tools. This makes it more difficult to make this upgradable. But to keep all our project up-to-date on the frontend-side, we have the need for an updater.
Some first ideas
Let's make a node application to handle the updates. This will be integrated in the baseinstall. And this will update itself if needed.
The updater should be driven by .json files with all the changes that need to be made. The updater should connect to the master git branch of the baseinstall and check if there are newer update files.
A possible flow:
What the update file should facilitate:
Extra
Make a cleanup function to clean up some example files like the jsplugin folder. Also remove this path in the tailwind.config. And remove the source files and the doc files from the updater. ⚠️ This cleanup should not work when run in the baseinstall itself.
Testing?
Take screenshots of all pages based on the sitemap of the site before the upgrade. Take screenshots after the update do a diff on the screenshots to see if the upgrade breaks something.