From 0ac16214941e5617cbc7fbbd868093d8199c6954 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sun, 6 Jul 2025 10:40:33 +0200 Subject: [PATCH 1/2] Added option for projects to add own variables. --- SConscript | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SConscript b/SConscript index fe98247..18ef171 100644 --- a/SConscript +++ b/SConscript @@ -871,6 +871,10 @@ vars.Add('COMPILATIONDB_FILTER_FILES', 'Removes source files from the compilatio vars.Add('SHOW_INCLUDES', 'Show include hierarchy (for debugging).', False) vars.Add('ENABLE_ASAN', 'Enable address sanitization.', bool(enable_asan)) +if 'VARIABLES' in config: + for vardef in config['VARIABLES']: + vars.Add(*vardef) + tools = ['default', 'compilation_db', 'unity_build'] if 'TOOLS' in config: tools.extend(config['TOOLS']) From 4bae8d67a0456b85e4aad16c91acfd8da5f02de6 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Mon, 7 Jul 2025 00:13:07 +0200 Subject: [PATCH 2/2] Just warn instead of failing when tags cannot be fetched. --- addons/gitbranch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/gitbranch.py b/addons/gitbranch.py index f06cdfa..f2a7bc3 100644 --- a/addons/gitbranch.py +++ b/addons/gitbranch.py @@ -50,7 +50,10 @@ def _git_branch(env: Environment, repo_name: str, remote_url: str, git_ref: str def _git_tags(env: Environment, repo_name: str, remote_url: str, force_fetch: bool = False) -> 'list[str]': repo, origin = _clone(env, repo_name, remote_url) if force_fetch or env['UPDATE_REPOSITORIES']: - origin.fetch(tags=True) + try: + origin.fetch(tags=True) + except GitError: + env.Warn(f'Error fetching tags from {repo_name} ({remote_url})') return [t.name for t in repo.tags] def _make_callable(val):