Skip to content

Commit

Permalink
Check if stashing is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
dianzrong authored Jun 5, 2023
1 parent c5ff8b7 commit d564bf4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions openadapt/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
result = subprocess.run(["git", "status"], capture_output=True, text=True)

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

if "Changes to be committed:" or \
"Changes not staged for commit:" in result.stdout:
subprocess.run(["git", "stash"])
print("Changes stashed")

subprocess.run(["git", "pull"])
print("Updated the OpenAdapt App")

Expand Down

0 comments on commit d564bf4

Please sign in to comment.