fix path in set_docs_to_build
This commit is contained in:
parent
722a313cc1
commit
565bbd5002
@ -238,11 +238,13 @@ def set_docs_to_build(build_all):
|
|||||||
doc_pattern = re.compile(
|
doc_pattern = re.compile(
|
||||||
r"^(?:.github/workflows/|docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$"
|
r"^(?:.github/workflows/|docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$"
|
||||||
)
|
)
|
||||||
|
github_workspace = os.environ.get("GITHUB_WORKSPACE") or ""
|
||||||
|
github_workspace = github_workspace and github_workspace + "/"
|
||||||
for p in changed_files:
|
for p in changed_files:
|
||||||
if (
|
if (
|
||||||
p.endswith(".c")
|
p.endswith(".c")
|
||||||
and not subprocess.run(
|
and not subprocess.run(
|
||||||
f"git diff -U0 {os.environ.get('BASE_SHA')}...{os.environ.get('HEAD_SHA')} {p} | grep -o -m 1 '^[+-]\/\/|'",
|
f"git diff -U0 $BASE_SHA...$HEAD_SHA {github_workspace + p} | grep -o -m 1 '^[+-]\/\/|'",
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
shell=True,
|
shell=True,
|
||||||
).stdout
|
).stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user