forked from frida/frida
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
cobalt-e edited this page May 30, 2024
·
1 revision
hello welcome to the editing of the frida
often i like to go configure+make over using repo.py as i don't keep my own version of releng. during the build process it can be handy to create an environment variable for $FRIDA_VERSION
$FRIDA_VERSION = $(python releng\frida_version.py)
however when working with my own files the 'git describe' that the script calls returns too many numbers for it to handle.
i don't see the point of cloning a repo to change a few lines in one file. the trade-off is that my local change gets rewritten when updating... (i am github babby)
so these are the differences to add to releng\frida_version.py
if (repo / ".git").exists():
description = subprocess.run(["git", "describe", "--tags", "--always", "--long"],
cwd=repo,
capture_output=True,
encoding="utf-8").stdout
tokens = description.strip().replace("-", ".").split(".")
+ if "dev" in tokens:
+ tokens.remove("dev")
+ if len(tokens) > 5:
+ ver_nums = tokens[:4]
+ commit_hash = tokens[-1]
+ tokens = ver_nums + [commit_hash]
if len(tokens) > 1:
(raw_major, raw_minor, raw_micro, raw_nano, commit) = tokens
major = int(raw_major)
minor = int(raw_minor)
micro = int(raw_micro)
nano = int(raw_nano)
if nano > 0:
micro += 1