Currently, ZPUI updater assumes it's run as a systemctl service, in system-wide directory (/opt/zpui), and not from the local directory (/home/pi/ZPUI or something of that sort). When developing, people might run the updater while running ZPUI as python main.py, and the updater dismisses all the changes to in-git-tree files (so it won't remove config files and custom apps, but will discard changes made to files that exist in the ZPUI git). So, useful code (and other) changes might be lost.
TODO:
[ ] Add some kind of method allowing us to distinguish how ZPUI is run - as a service or from command-line
[ ] In apps/settings/main.py=>GitInterface.pull(), make the file overwrite conditional on the result of the aforementioned method
[ ] In apps/settings/main.py=>GitUpdater.revert_pull(), consider whether git reset --hard needs to be conditional (probably does, it's no trouble fixing a borked update from command-line, either way)
Currently, ZPUI updater assumes it's run as a systemctl service, in system-wide directory (
/opt/zpui
), and not from the local directory (/home/pi/ZPUI
or something of that sort). When developing, people might run the updater while running ZPUI aspython main.py
, and the updater dismisses all the changes to in-git-tree files (so it won't remove config files and custom apps, but will discard changes made to files that exist in the ZPUI git). So, useful code (and other) changes might be lost.TODO:
apps/settings/main.py=>GitInterface.pull()
, make the file overwrite conditional on the result of the aforementioned methodapps/settings/main.py=>GitUpdater.revert_pull()
, consider whethergit reset --hard
needs to be conditional (probably does, it's no trouble fixing a borked update from command-line, either way)