You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
CRImier
changed the title
Updater might remove uncommited changes to in-tree files when run as "python main.py"
Git updater might remove uncommited changes to in-tree files when run as "python main.py"
Oct 18, 2018
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)The text was updated successfully, but these errors were encountered: