Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git updater might remove uncommited changes to in-tree files when run as "python main.py" #116

Open
3 tasks
CRImier opened this issue Oct 18, 2018 · 0 comments
Labels
bug developer-friendliness Anything that helps people working on apps help wanted

Comments

@CRImier
Copy link
Member

CRImier commented 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 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)
@CRImier 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
@CRImier CRImier added bug help wanted developer-friendliness Anything that helps people working on apps labels Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug developer-friendliness Anything that helps people working on apps help wanted
Projects
None yet
Development

No branches or pull requests

1 participant