Xcode server bot: pre Scripts error Trigger Error: Trigger exited with non-zero status 1

Xcode server bot: pre Scripts error Trigger Error: Trigger exited with non-zero status 1

我想设置一个 Xcode 服务器来存档我的项目,但是我遇到了一个 tigger 问题,即 tigger 错误 Tigger 以非零状态 1 退出。

这是我的脚本:

#!/bin/sh
#make sure the encoding is correct
export LANG=en_US.UTF-8

# fix the path so Ruby can find it's binaries
export PATH=/usr/local/bin:$PATH
# echo "PATH: $PATH"

cd "${XCS_PRIMARY_REPO_DIR}/ZHXShop/"

/usr/local/bin/pod install --verbose --no-repo-update

我的项目叫ZHXShop,也是“/usr/local/bin/pod”可以在我的电脑查找器中搜索,我的项目中没有使用Fastlane

My env:
Xcode -> 11.5
Mac os -> 10.15.5
Cocoapods -> 1.9.1
Ruby -> 2.7.0
rvm -> 1.29.10 

结束 希望大家的解答

尝试在调用 pod install 后立即添加 wait。您可以在编辑 Xcode 服务器机器人时将其添加为添加 Pre-Integration 触发器。

#!/bin/sh

# cd to where your Podfile is
cd "${XCS_PRIMARY_REPO_DIR}/ZHXShop/"

# add to the path, or explicitly add the path to your `pod` call
export PATH=/usr/local/bin:$PATH
pod install --verbose --no-repo-update

wait

我在 wait

上找到的笔记

The wait() function suspends execution of its calling thread until status information is available for a child process or a signal is received.