XCode Cloud 构建变量 CI_WORKSPACE 为空

问题描述 投票:0回答:1

我的 flutter 应用程序的 XCode Cloud 构建突然开始失败,而我没有对其进行任何预期的更改。

以下是我的

ci_post_clone.sh
脚本。

echo "Starting CI script..."

echo $CI_WORKSPACE

# The default execution directory of this script is the ci_scripts directory.
cd $CI_WORKSPACE # change working directory to the root of your cloned repo.

ls

# Install Flutter using git.
git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"

# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
flutter precache --ios

# Install Flutter dependencies.
flutter pub get

# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods

cd ios && pod install # run `pod install` in the `ios` directory.

flutter build ios

echo $CI_WORKSPACE
中的行仅记录一个空行,因此看来该变量未设置/为空。因此以下命令无法执行。

但是,我不明白为什么这个变量是空的? CI_WORKSPACE 是如何设置的以及如何修复它以便它再次具有克隆存储库的位置?

xcode continuous-integration xcode-cloud
1个回答
0
投票

不幸的是,它现在似乎被删除了。 :( 我认为最好使用 CI_PRIMARY_REPOSITORY_PATH 而不是 CI_WORKSPACE https://developer.apple.com/documentation/xcode/environment-variable-reference

© www.soinside.com 2019 - 2024. All rights reserved.