Skip to content

Commit

Permalink
[FirmwareFlasher] Normalise GIT repo origin (#201)
Browse files Browse the repository at this point in the history
* add firmware.cfg to gitignore

* increment to 0.0.6

* normalize katapult repo url to remove .git

* removed increment
  • Loading branch information
krautech committed Dec 16, 2024
1 parent 79a72dd commit d8ea0d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,5 @@ dmypy.json

# Cython debug symbols
cython_debug/

scripts/firmware.cfg
6 changes: 5 additions & 1 deletion scripts/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,11 @@ def verify_repository(self) -> bool:
check=True,
)
origin_url = result.stdout.strip().lower()
if origin_url != "https://github.com/arksine/katapult".lower():
# Normalize URLs by removing '.git' at the end if present
normalized_url = origin_url.rstrip(".git")
expected_url = "https://github.com/arksine/katapult".rstrip(".git")

if normalized_url != expected_url:
Utils.error_msg(f"Unexpected repository URL: {origin_url}")
return False
except subprocess.CalledProcessError as e:
Expand Down

0 comments on commit d8ea0d9

Please sign in to comment.