Make script work in both branches

Signed-off-by: Elena Uziunaite <[email protected]>
This commit is contained in:
Elena Uziunaite
2024-12-18 12:14:11 +02:00
parent 3cb213b5c7
commit 7b91d1e58c
+12 -5
View File
@@ -11,6 +11,7 @@ import re
import subprocess
import sys
from typing import FrozenSet, List, Optional
from mbedtls_framework import build_tree
UNCRUSTIFY_SUPPORTED_VERSION = "0.75.1"
CONFIG_FILE = ".uncrustify.cfg"
@@ -132,11 +133,17 @@ def get_src_files(since: Optional[str]) -> List[str]:
# Don't correct style for third-party files (and, for simplicity,
# companion files in the same subtree), or for automatically
# generated files (we're correcting the templates instead).
src_files = [filename for filename in src_files
if not (filename.startswith("tf-psa-crypto/drivers/everest/") or
filename.startswith("tf-psa-crypto/drivers/p256-m/") or
filename in generated_files or
is_file_autogenerated(filename))]
if build_tree.is_mbedtls_3_6():
src_files = [filename for filename in src_files
if not (filename.startswith("3rdparty/") or
filename in generated_files or
is_file_autogenerated(filename))]
else:
src_files = [filename for filename in src_files
if not (filename.startswith("tf-psa-crypto/drivers/everest/") or
filename.startswith("tf-psa-crypto/drivers/p256-m/") or
filename in generated_files or
is_file_autogenerated(filename))]
return src_files
def get_submodule_hash(commit: str, submodule: str) -> str: