Skip to content

Commit

Permalink
Merge pull request #132 from frappe/fix-inplaceup
Browse files Browse the repository at this point in the history
fix: minor fixes to inplace updates
  • Loading branch information
18alantom authored Sep 19, 2024
2 parents 1a14def + eab0f2e commit 06488f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions agent/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,11 @@ def _pull_app_change(self, app: BenchUpdateApp) -> list[str]:
new_hash: str = app["hash"]
old_hash: str = exec("git rev-parse HEAD")["output"]

if old_hash == new_hash:
# Remove remote, url might be private
exec(f"git remote remove {remote}")
return []

# Fetch new hash and get changed files
exec(f"git fetch --depth 1 {remote} {new_hash}")
diff: str = exec(f"git diff --name-only {old_hash} {new_hash}")["output"]
Expand Down Expand Up @@ -1156,9 +1161,8 @@ def should_rebuild_frontend(file: str) -> bool:
def should_migrate_sites(file: str) -> bool:
return _should_run_phase(
file,
["hooks.py"],
["hooks.py", ".json"],
["patches"],
["*/doctype/*/*.json"],
)


Expand Down

0 comments on commit 06488f4

Please sign in to comment.