前提声明:
由于 add plugin 失败,我将 plugin 抽出来,放到 action 里面了。并关闭了 Faraday ssl 验证。
使用 plugin 时的错误信息
[15:09:29]: fastlane detected a Gemfile in the current directory
[15:09:29]: However, it seems like you didn't use `bundle exec`
[15:09:29]: To launch fastlane faster, please use
[15:09:29]:
[15:09:29]: $ bundle exec fastlane search_plugins
[15:09:29]:
[15:09:29]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[15:09:30]: Installing Ruby gem 'fastlane-plugin-zealot'...
[15:09:43]: Found gem "fastlane-plugin-trello" instead of the required name "fastlane-plugin-zealot"
[15:09:45]: Successfully installed 'fastlane-plugin-zealot'
[15:09:45]: Error loading plugin 'fastlane-plugin-zealot': cannot load such file -- fastlane/plugin/zealot
[15:09:45]: It seems like you wanted to load some plugins, however they couldn't be loaded
[15:09:45]: Please follow the troubleshooting guide: https://docs.fastlane.tools/plugins/plugins-troubleshooting/
+------------------------+-----------+------------------+
| Used plugins |
+------------------------+-----------+------------------+
| Plugin | Version | Action |
+------------------------+-----------+------------------+
| fastlane-plugin-zealot | undefined | No actions found |
+------------------------+-----------+------------------+
[!] No actions were found while loading one or more plugins
Please use `bundle exec fastlane` with plugins
More info - https://docs.fastlane.tools/plugins/using-plugins/#run-with-plugins
主要问题描述
设置某个渠道 channel_key 的时候,上传的位置会变成 “测试版” 渠道,非原渠道。
具体 Lane
lane :upload_app_to_zealot do
scheme_name = "myApp"
zealot(
endpoint: Zealot_endpoint,
token: Zealot_token,
channel_key: Zealot_myApp_ios_channel_key,
file: "./fastlane/build/"+scheme_name+".ipa"
)
end
DEBUG [2020-01-11 15:35:09.99]: Zealot: #<FastlaneCore::Configuration:0x00007fdafa70fd00>
DEBUG [2020-01-11 15:35:09.99]: Zealot form: {:token=>"320aaaf980e20e7b058be2d77154daaa", :channel_key=>"6795aac6577a0cbe2c29fe1223848f6d", :file=>#<UploadIO:0x00007fdafa7163f8 @content_type="application/octet-stream", @original_filename="myApp.ipa", @local_path="./fastlane/build/myApp.ipa", @io=#<File:./fastlane/build/myApp.ipa>, @opts={}>, :source=>"fastlane"}
INFO [2020-01-11 15:35:09.99]: Uploading to https://beta.myApp.me ...
DEBUG [2020-01-11 15:35:22.00]: {"version"=>1, "app_name"=>"myApp iOS 测试版", "bundle_id"=>"com.myApp.myApp", "release_version"=>"2.8.1", "build_version"=>"2", "source"=>"Web", "branch"=>nil, "git_commit"=>nil, "ci_url"=>nil, "size"=>74186451, "icon_url"=>"https://beta.myApp.me/uploads/apps/a3/r49/icons/caa9f61575cc76aec144f10f8c28905a.png", "release_url"=>"https://beta.myApp.me/channels/pBJWh/releases/49", "install_url"=>"itms-services://?action=download-manifest&url=https://beta.myApp.me/api/apps/pBJWh/1/install", "qrcode_url"=>"https://beta.myApp.me/channels/pBJWh/releases/49/qrcode?size=thumb", "changelog_list"=>[{"message"=>"没有找到更新日志,可能的原因:\n\n- 开发者很懒没有留下更新日志😂\n- 有不可抗拒的因素造成日志丢失👽"}], "created_at"=>"2020-01-11T15:35:21.757+08:00", "app"=>{"id"=>3, "name"=>"myApp"}, "scheme"=>{"id"=>8, "name"=>"测试版"}, "channel"=>{"slug"=>"pBJWh", "name"=>"iOS", "device_type"=>"ios", "bundle_id"=>"*", "git_url"=>nil, "has_password"=>false}}
INFO [2020-01-11 15:35:22.00]: Release URL: https://beta.myApp.me/channels/pBJWh/releases/49
INFO [2020-01-11 15:35:22.00]: QRCode URL: https://beta.myApp.me/channels/pBJWh/releases/49/qrcode?size=thumb
INFO [2020-01-11 15:35:22.00]: Download URL: itms-services://?action=download-manifest&url=https://beta.myApp.me/api/apps/pBJWh/1/install
INFO [2020-01-11 15:35:22.00]: Build successfully uploaded to Zealot.
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | zealot | 12 |
+------+------------------+-------------+
INFO [2020-01-11 15:35:22.01]: fastlane.tools finished successfully 🎉
但如果设置了 slug,就会报错:
lane :upload_app_to_zealot do
scheme_name = "myApp"
zealot(
endpoint: Zealot_endpoint,
token: Zealot_token,
channel_key: Zealot_myApp_ios_channel_key,
slug: Zealot_beta_slug,
file: "./fastlane/build/"+scheme_name+".ipa"
)
end
DEBUG [2020-01-11 15:39:54.04]: Zealot: #<FastlaneCore::Configuration:0x00007fd7cc4eda30>
DEBUG [2020-01-11 15:39:54.04]: Zealot form: {:token=>"320aaaf980e20e7b058be2d77154daaa", :channel_key=>"6795aac6577a0cbe2c29fe1223848f6d", :file=>#<UploadIO:0x00007fd7cc4f60b8 @content_type="application/octet-stream", @original_filename="myApp.ipa", @local_path="./fastlane/build/myApp.ipa", @io=#<File:./fastlane/build/myApp.ipa>, @opts={}>, :slug=>"bUcdE", :source=>"fastlane"}
INFO [2020-01-11 15:39:54.04]: Uploading to https://beta.myApp.me ...
DEBUG [2020-01-11 15:40:04.89]: {"error"=>"resource could not be processed with errors", "entry"=>nil}
ERROR [2020-01-11 15:40:04.89]: Error uploading to Apphost: {"error"=>"resource could not be processed with errors", "entry"=>nil}
INFO [2020-01-11 15:40:04.90]: Successfully generated documentation at path '/Volumes/Storage/Work/Carbon_WorkSpace/Repos/FastlaneSource/fastlane/README.md'
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | zealot | 10 |
+------+------------------+-------------+
INFO [2020-01-11 15:40:04.90]: fastlane.tools finished successfully 🎉