Skip to content

Commit

Permalink
fixed sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
jc01rho committed May 5, 2022
1 parent 8eb14b9 commit 2e560b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selfdrive/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from selfdrive.hardware import HARDWARE, PC
from selfdrive.swaglog import cloudlog
from selfdrive.version import get_branch, get_commit, get_origin, get_version, \
is_comma_remote, is_dirty, is_tested_branch
is_comma_remote, is_dirty, is_tested_branch, is_jc01rho_remote
import datetime
import traceback

Expand Down Expand Up @@ -53,8 +53,8 @@ def set_tag(key: str, value: str) -> None:

def init(project: SentryProject) -> None:
# forks like to mess with this, so double check
comma_remote = is_comma_remote() and "commaai" in get_origin(default="")
if not comma_remote or not is_registered_device() or PC:
jc01rho_remote = is_jc01rho_remote() and "jc01rho" in get_origin(default="")
if not jc01rho_remote or PC: #or not is_registered_device()
return

env = "release" if is_tested_branch() else "master"
Expand Down
10 changes: 10 additions & 0 deletions selfdrive/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ def is_comma_remote() -> bool:
return origin.startswith('git@github.com:commaai') or origin.startswith('https://github.com/commaai')


@cache
def is_jc01rho_remote() -> bool:
origin = get_origin()
if origin is None:
return False

return origin.startswith('git@github.com:jc01rho-openpilot-BoltEV2019-KoKr') or origin.startswith('https://github.com/jc01rho-openpilot-BoltEV2019-KoKr')



@cache
def is_tested_branch() -> bool:
return get_short_branch() in TESTED_BRANCHES
Expand Down

0 comments on commit 2e560b1

Please sign in to comment.