如何更改Expo中本地EAS构建的输出路径?

huangapple go评论53阅读模式
英文:

How do I change the output path for local EAS builds in Expo?

问题

如何更改EAS本地构建的路径?

目前,当我运行本地EAS构建时,构建输出位于项目根目录中。我想为构建输出定义一个自定义路径。

我尝试阅读文档,最有希望的是https://docs.expo.dev/build-reference/eas-json/。但我仍然不完全清楚。

英文:

How can i change the path of EAS local builds?

Currently when i run a local EAS build, the build output is in the project root. I would like to define a custom path for the build output.

I have tried reading through the docs and the most promising is https://docs.expo.dev/build-reference/eas-json/. But it is still not 100% clear to me.

答案1

得分: 1

你可以通过使用 --output 标志来实现这一点。

示例 - eas build -p ios --local --profile production --output "<CUSTOM_DIRECTORY>/<ipa|aab>"

英文:

You can achieve this by using the --output flag.

Example - eas build -p ios --local --profile production --output &quot;&lt;CUSTOM_DIRECTORY&gt;/&lt;ipa|aab&gt;&quot;

答案2

得分: 0

Method 1. 使用一对环境变量,您可以设置如下。这是来自文档的信息:

EAS_LOCAL_BUILD_WORKINGDIR - 指定构建过程的工作目录,默认情况下它位于某个位置(依赖于平台)在 /tmp 文件夹中。

EAS_LOCAL_BUILD_SKIP_CLEANUP=1 - 将其设置为禁用构建过程完成后清理工作目录。

Method 2.--local之后添加--output标志,然后指定输出目录,如下所示(还显示其他标志)。

eas build [-p android|ios|all] [-e &lt;value&gt;] [--local] [--output &lt;value&gt;] [--wait] [--clear-cache]
    [--auto-submit | --auto-submit-with-profile &lt;value&gt;] [-m &lt;value&gt;] [--json --non-interactive]

注意: 方法1优先于方法2,这意味着如果您设置了环境变量,则方法2不起作用。

英文:

Method 1.
Using a couple of env variables you can set it as below. This is from the doc:

EAS_LOCAL_BUILD_WORKINGDIR - Specify the working directory for the build process, by default it's somewhere (it's platform dependent) in /tmp folder.

EAS_LOCAL_BUILD_SKIP_CLEANUP=1 - Set this to disable cleaning up the working directory after the build process is finished.

Method 2.
It is mentioned in the --help that it can be done by adding the --output flag after the --local and specifying the output directory as below (showing other flags too).

eas build [-p android|ios|all] [-e &lt;value&gt;] [--local] [--output &lt;value&gt;] [--wait] [--clear-cache]
    [--auto-submit | --auto-submit-with-profile &lt;value&gt;] [-m &lt;value&gt;] [--json --non-interactive]

Note:
Method 1 takes precedence over Method 2, meaning if you set the env variable, Method 2 does not work.

huangapple
  • 本文由 发表于 2023年5月22日 16:40:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76304400.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定