fastlane 问题记录

Q: 在Jenkins 中执行fastlane 命令时,会报如下错误

[15:29:13]: [33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile[0mLooking for related GitHub issues on fastlane/fastlane...

经测试发现可以在execute shell 中加入如下代码:
export LANG="en_US.UTF-8"

Q: /Users/Shared/Jenkins/tmp/jenkins3974391514400956020.sh: line 3: fastlane: command not found

确保Jenkins用户那边是否安装了faselane ,如果没有安装则需要安装ruby 、rvm 、fastlane


Q: fastlane error
+ fastlane -v/Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fastlane (>= 0.a) (Gem::GemNotFoundException)from /Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems.rb:299:in `activate_bin_path'from /Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.0/bin/fastlane:23:in `
'from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `
'Build step 'Execute shell' marked build as failure

需要更新或下载fastlane 版本

Q: 怎么删除fastlane 指定版本?
gem uninstall fastlane --version=2.55.0
ERROR: While executing gem ... (Gem::InstallError)
fastlane is not installed in GEM_HOME, try:
gem uninstall -i /Users/weihuang/.rvm/gems/ruby-2.4.0@global fastlane
weideMac-mini:~ weihuang$ gem uninstall -i /Users/weihuang/.rvm/gems/ruby-2.4.0@global fastlane --version=2.55.0
Successfully uninstalled fastlane-2.55.0

Q: 怎么更新fastlane ?
执行 fastlane update_fastlane

Q: jenkins 怎么配置fastlane ?
在execute shell 中加入以下语句:
#!/usr/bin/env bash
source ~/.bash_profile
export LANG="en_US.UTF-8"

Q: fastlane 怎么添加登录iTunes connect 凭证?
fastlane fastlane-credentials add --username xxx@xxx. (appid)
Password: **********
Credential [email protected]:************ added to keychain.

https://github.com/fastlane/fastlane/tree/master/credentials_manager

你可能感兴趣的:(fastlane)