Avatar

File version numbers (My Little Forum)

by Auge @, Monday, January 08, 2018, 11:51 2531 days ago

Hello

As discussed in the original project forum it is desirable to have a more robust handling of files, that have to be updated in the case of a new version. I want to continue the discussion here.

Summary of the old discussion is:

- the list of files in the update script can be inaccurate because of forgotten files
- the admin, who undertakes the update, can forget to update a file or directory

This is non-satisfying because every when an then a forum operator will report issues with the functions or the template because one of us (maintainer team) who packaged the update forgot to note a file name in the update script or the admin forgot to upload the css file or a subtemplate or a script.

The idea to solve this was to introduce a file version number for every single file. It could be a simple counter that increments in case of changes. The version of the file should be checked against a separate list of the file versions matching with the new version. Micha's idea was to increment the counter once before the release of a new version, mine was to increment it with every commit that affects the file. In both cases the theoretical failing point is to forget the increasing step of a file version number.

While it is no problem to carry a variable with the version number in the PHP and JavaScript scripts it is a bit more complicated for the HTML-templates and the CSS file(s). Even more it is problematic to handle a patched default template. The recommendation to copy the template and to apply the changes to the copied, own template dies away continuously.

The changes of the forum operator shouldn't be overwritten but our changes are often mandatory (i.e. new form fields) so the update must stay incomplete without the update of the template files.

As last for now: The variables should be checked after an update and therefore the variable names must be unique in the meaning of non colliding with other names of the "thousand" variables in the scripts.

So far the summary and a few considerations from my side.

Tschö, Auge

  • locked

RSS Feed of thread