Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
golovasteek committed May 26, 2024
1 parent 875c5f4 commit e5758d2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Empty file added third-party/BUILD.bazel
Empty file.
31 changes: 31 additions & 0 deletions third-party/bazel/edm.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
def _edm_repositories_impl(rctx):
rctx.file("BUILD.bazel")
build_files_args = []
for build_file in rctx.attr.build_files:
build_files_args.append("--build-file")
build_files_args.append(str(build_file))
print("build_files_args: ", build_files_args)
exec_result = rctx.execute(
["edm", "bazel", rctx.attr.dependencies_yaml] +
build_files_args,
)
if exec_result.return_code != 0:
fail("edm exec error: ", exec_result.stderr)

rctx.file("deps.bzl", content=exec_result.stdout)


edm_repositories = repository_rule(
_edm_repositories_impl,
attrs={
"dependencies_yaml": attr.label(
mandatory=True,
allow_single_file=True,
doc="Path to the dependencies.yaml file",
),
"build_files": attr.label_list(
allow_files=True,
doc="List of build files for external repositories",
),
},
)

0 comments on commit e5758d2

Please sign in to comment.