ZeroPhone / ZPUI

Official ZeroPhone UI framework, based on pyLCI
http://zpui.rtfd.org/
Apache License 2.0
79 stars 19 forks source link

./update.sh lost ability to transfer changes from local directory #59

Open CRImier opened 6 years ago

CRImier commented 6 years ago

I'm now testing ./update.sh and it appears there's been a misunderstanding about what ./update.sh can do. What it used to do beforehand is:

The last thing is especially bad (since it breaks existing ZPUI installs), so I'll work around it right now.

CRImier commented 6 years ago

One more thing that changed is - now it only pulls from the master branch. So, if the local install is on the devel branch and there are breaking changes compared to master (which is very likely), the script will fail.

I think I didn't clarify the script's usecases enough. It's useful during development when used from the local directory, mainly for:

The current fix removes the temporary directory feature, as well as removes the explicit usage of "master" branch. It fixes the problems, but obviously it's a step back. I don't yet fully understand what'd be the best way to resolve this problem, so the question is to @monsieurh - what's your take on this?

monsieurh commented 6 years ago

I submitted a PR for a port of update.sh in python, doesn't deal with the 'changed code' issue though. Gotta think about it.

CRImier commented 6 years ago

The update app doesn't actually need to rsync from local directory to the install directory - because the update app is only meant to be run from the install directory (while ZPUI is being ran as a service). In fact, the update app isn't even supposed to know about the local directory =)

monsieurh commented 6 years ago

Not quite sure about what you mean here : can you elaborate ? If you're talking about the python version : at some point during the update two repository exists : one in /opt/zpui the other in /tmp/zpui_update. However, they don't contain the same files. Since a git clone is used to create /tmp/zpui_update, so any uncommited file isn't cloned (typically config files).

That's something that's not dealt with yet. I'm looking for ideas.