From dc2fdb1145dfdc91ee35b69052a2b78372dac86d Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Thu, 31 Oct 2024 12:27:59 -0700 Subject: [PATCH] Correct code-workspace to include build-dependent libbitcoin projects with repositories. --- templates/gsl.code-workspace | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/templates/gsl.code-workspace b/templates/gsl.code-workspace index 6f6d9c8..3044f24 100644 --- a/templates/gsl.code-workspace +++ b/templates/gsl.code-workspace @@ -18,6 +18,16 @@ function workflow_relative_path(repository, path_prefix) canonical_path_name(my.repository)), my.subpath) endfunction +function has_repository(build) + define my.build = has_repository.build + return defined(my.build.repository) +endfunction + +function is_libbitcoin_project(build) + define my.build = is_libbitcoin_project.build + return defined(my.build.github) & (my.build.github = "libbitcoin") +endfunction + # Generation ############################################################################### .endtemplate @@ -34,9 +44,14 @@ endfunction . output(my.out_file) { "folders": [ +. new projects as _cumulative +. cumulative_install(_cumulative, generate, _repository) +. for _cumulative.build as _build where is_libbitcoin_project(_build) & has_repository(_build) { - "path": "../../../$(_repository.name)" - } + "path": "../../../$(_build.repository)" + }$(last() ?? "" ? ",") +. endfor +. endnew ], "settings": {} }