【问题标题】:Build using expo eas and got gitCommitMessage error使用 expo eas 构建并获取 git Commit Message 错误
【发布时间】:2023-02-17 19:51:55
【问题描述】:

当我开始使用 eas android app-bundle 构建时,我收到了这条消息:

Compressing project files and uploading to EAS Build. Learn more
  ValidationError: "gitCommitMessage" is not allowed to be empty

eas.json

{
    "build": {
        "preview": {
            "android": {
                "buildType": "app-bundle",
                "gradleCommand": ":app:assembleRelease",
                "developmentClient": false,
                "withoutCredentials": true
            }
        },
        "production": {}
    }
}

我不知道会发生什么

【问题讨论】:

    标签: react-native expo eas


    【解决方案1】:

    这样的错误消息可能是由我能想到的一些事情引起的。

    1. 在运行 eas build 时,对你签出到的分支所做的一个或多个文件的最后一次提交有一条空消息

      如果是这种情况,解决方案是添加一个新的提交(它可以是一个空的,但有一条消息)。这是一个如何做到这一点的例子:

      git commit --allow-empty -m "Place commit message here"
      
      1. 或者,但不太可能,您可能正在运行 eas build 命令,在消息标志“-m”后带有一个空字符串。例子:

        轻松构建-p 全部-m

      如果是这种情况,要么删除“-m”标志,要么向您的构建添加一条消息,类似于上面的 eas build -p all -m YOUR_COMMENT

    【讨论】:

    • 请将此表述为解释性条件答案,以避免给人留下澄清问题而不是回答的印象(应该使用评论而不是答案,比较meta.stackexchange.com/questions/214173/…)。例如,“如果您的问题是……那么解决方案就是……因为……”。
    猜你喜欢
    • 2023-02-25
    • 2022-07-04
    • 2023-01-05
    • 2022-07-08
    • 1970-01-01
    • 2021-11-08
    • 2023-02-08
    • 2022-11-10
    • 2022-06-28
    相关资源
    最近更新 更多