Open syzop opened 1 year ago
One thing that git
keeps track of is file renames, so if we move xyz.php to somedir/xyz.php and you did a git pull
then it really moved to there. So that's good.
On the contrary, with releases, if you would just extract a .tar.gz over everything, then it would have the new somedir/xyz.php but the old xyz.php would still exist. So that would quickly become a mess after a few upgrades. And not only will it be messy, with old code laying around you may also keep old vulnerabilities that nobody is thinking about anymore.
So, ideally, for releases, if your existing webpanel is in /var/www/html/webpanel
you would:
/var/www/html/webpanel.new
/var/www/html/webpanel/config/config.php
over to /var/www/html/webpanel.new/config
data/
directory/var/www/html/webpanel
to /var/www/html/webpanel.old
/var/www/html/webpanel.new
to /var/www/html/webpanel
Unfortunately i think with most file permissions for /var/www/html that is not possible, so.... hmmmm..... either make that possible or.. find some other way, that could be more fragile.
Both from the webpanel and from the new CLI tool: a way to easily update the webpanel to the latest version.
Right now, this could be as easy as running
git pull
andcomposer install
(may need some detection to search for composer). When we have releases it would have to download the release from GitHub, extract the .tar.gz, etc..Ideally do this in a safe manner, creating some sort of backup prior, just in case.