如何使用shell在gitlab-ci中安装brew
# - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# - sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
# - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install
- curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install
- PATH=/usr/local/bin:$PATH
这无法成功安装
这是我的.gitlab-ci.yml文件代码
stages:
- build
- archive
before_script:
- gem install cocoapods
# - pod install
build_project:
stage: build
script:
# - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# - sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
# - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install
- curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install
- PATH=/usr/local/bin:$PATH
- brew install xctool
- xctool -project cicdios.xcodeproj -scheme cicdios clean
- xctool -project cicdios.xcodeproj -scheme cicdios test -test-sdk iphonesimulator9.3
archive_project:
stage: archive
script:
- xctool -project cicdios.xcodeproj -scheme cicdios archive -archivePath build/cicdios
- xcodebuild -exportArchive -exportFormat ipa -archivePath "build/cicdios.xcarchive" -exportPath "build/cicdios.ipa"
only:
- master
artifacts:
paths:
- build/cicdios.ipa
我想在gitlab-ci中构建项目,但是这个yml需要安装xctool,因此如果我安装xctool必须安装brew,但是我不知道如何在其中安装brew