Skip to content

Commit

Permalink
after initial test
Browse files Browse the repository at this point in the history
  • Loading branch information
dianzrong committed Jun 21, 2023
1 parent ed26aad commit 2f7debc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions openadapt/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Usage:
python3 -m openadapt.start
"""

from loguru import logger
import subprocess

from openadapt.app.main import run_app
Expand All @@ -31,16 +31,17 @@ def start_openadapt_app() -> None:
"""
result = subprocess.run(["git", "status"], capture_output=True, text=True)

if "branch is up to date" not in result.stdout:
if changes_needed(result.stdout):
subprocess.run(["git", "stash"])
print("Changes stashed")
if changes_needed(result.stdout):
subprocess.run(["git", "stash"])
print("Changes stashed")

subprocess.run(["git", "pull"])
if "branch is up to date" not in result.stdout:
subprocess.run(["git", "pull", "-q"])
print("Updated the OpenAdapt App")

run_app() # start gui
# run_app() # start gui


if __name__ == "__main__":
start_openadapt_app()
logger.info("updated")

0 comments on commit 2f7debc

Please sign in to comment.