Skip to content

Commit

Permalink
detect-version: Improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Apr 24, 2024
1 parent deab91a commit cb4a203
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/detect-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
from typing import Iterator


REPO_DIR = Path(__file__).resolve().parent.parent
SOURCE_ROOT = Path(__file__).resolve().parent.parent


def detect_version() -> str:
releng_location = next(enumerate_releng_locations(), None)
if releng_location is not None:
sys.path.insert(0, str(releng_location.parent))
from releng.frida_version import detect
version = detect(REPO_DIR).name
version = detect(SOURCE_ROOT).name
else:
version = "0.0.0"
return version
Expand All @@ -31,7 +31,7 @@ def enumerate_releng_locations() -> Iterator[Path]:
if releng_location_exists(parent_releng):
yield parent_releng

local_releng = REPO_DIR / "releng"
local_releng = SOURCE_ROOT / "releng"
if releng_location_exists(local_releng):
yield local_releng

Expand Down

0 comments on commit cb4a203

Please sign in to comment.