如何将$(bazel info upput_base)/外部/*的获取文件复制到另一台计算机?

发布于 2025-02-05 05:06:48 字数 167 浏览 1 评论 0原文

我可以通过Bazel成功编译该项目,还可以使用HTTP-Archive获取第三_PARTY文件。 但是,我需要在另一台计算机中编译同一项目,但是在这台计算机中,我不想获取Third_party文件,因为该计算机未连接到Internet。

我想重复使用.cache/xx/external/*文件,该怎么做?

I can compile the project successfully via bazel, also fetch the third_party files using http-archive.
However, I need to compile the same project in another machine, but in this machine i don't want to fetch the third_party files because this machine not connected to the Internet.

And I want to reuse the .cache/xx/external/* files, how to do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

棒棒糖 2025-02-12 05:06:48

您可以使用命令行标志-distdir =< a Path>在访问网络下载之前,向Bazel提供搜索档案的其他位置。还要检查Bazel 有关此标志的文档>。

还要考虑有关在空地环境中运行Bazel

You can use the command line flag --distdir=<a path> to provide to Bazel with additional places to search for archives before accessing the network to download them. Check also the Bazel documentation about this flag.

Consider the documentation also about Running Bazel in an airgapped environment.

孤云独去闲 2025-02-12 05:06:48

@Ahumesky,@vertexwahn,谢谢,它有效。

  1. bazel sync -experimentim_repository_resolved_file = resolved.bzl,
    woved.bzl是json文件
  2. wget curls或curlved.bzl的卷发,然后将文件下载到
  3. .bazel.rc中的 $(您的目录) = $(您的目录)

它将有效。

@ahumesky, @Vertexwahn, thanks, it works.

  1. bazel sync --experimental_repository_resolved_file=resolved.bzl ,
    This resolved.bzl is a json file
  2. wget curls or curl of the resolved.bzl and download the files into the $(your directory)
  3. in the .bazel.rc, add the command "common --distdir=$(your directory) "

it will works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文