英文:
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 "<CUSTOM_DIRECTORY>/<ipa|aab>"
答案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 <value>] [--local] [--output <value>] [--wait] [--clear-cache]
[--auto-submit | --auto-submit-with-profile <value>] [-m <value>] [--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 <value>] [--local] [--output <value>] [--wait] [--clear-cache]
[--auto-submit | --auto-submit-with-profile <value>] [-m <value>] [--json --non-interactive]
Note:
Method 1 takes precedence over Method 2, meaning if you set the env variable, Method 2 does not work.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论