9

我正在尝试将 Apple ID 作为命令行选项传递给 Fastlane,以便所有用户和我们的构建服务器都可以使用相同的脚本。

MacBook-Pro-6:whisper-ios Nick$ fastlane hockeyglobal username:nlocking@whisper.sh
[18:00:44]: -------------------------------------------------
[18:00:44]: --- Step: Verifying required fastlane version ---
[18:00:44]: -------------------------------------------------
[18:00:44]: fastlane version valid
[18:00:44]: ------------------------------
[18:00:44]: --- Step: default_platform ---
[18:00:44]: ------------------------------
[18:00:44]: Driving the lane 'hockeyglobal' 
[18:00:44]: ------------------
[18:00:44]: --- Step: sigh ---
[18:00:44]: ------------------

+-------------------------------------+-----------------------+
|                   Summary for sigh 1.8.0                    |
+-------------------------------------+-----------------------+
| adhoc                               | true                  |
| skip_install                        | false                 |
| development                         | false                 |
| force                               | false                 |
| app_identifier                      | sh.whisper.whisperapp |
| team_id                             | B3NYR7PARX            |
| ignore_profiles_with_different_name | false                 |
| skip_fetch_profiles                 | false                 |
| skip_certificate_verification       | false                 |
+-------------------------------------+-----------------------+

[18:00:45]: To not be asked about this value, you can specify it using 'username'
Your Apple ID Username: 

令人发指的是,username:nlocking@whisper.shFastlane 似乎完全没有注意到它,就像apple_id:nlocking@whisper.sh-u nlocking@whisper.sh尝试过的所有其他东西一样。我究竟做错了什么?

4

4 回答 4

2

它将使用apple_id您的fastlane/Appfile. 确保您正在从其中的文件夹中运行命令fastlane/

于 2017-07-18T21:23:41.717 回答
2

尝试删除用户名,仅添加app_identifier, apple_id(email) 和team_idAppfile

于 2017-01-19T18:39:05.793 回答
2

不确定hockeyglobal通道,但通常传递username参数的正确语法如下:

fastlane hockeyglobal --username 'nlocking@whisper.sh'

例如,对于默认cert车道,这有效:

 fastlane cert --username 'me@myemailcom'

或者

 fastlane cert -u 'me@myemailcom'
于 2018-02-16T14:36:59.617 回答
1

I achieved this by using fastlane parameters. In your Fastfile do something like this:

lane :beta do |options|
  cert(username: options[:username])
  ...
end

(notice the |options| parameter above)

Then invoke fastlane like this:

fastlane beta username:email@example.com

Where email@example.com is your username.

于 2019-04-27T10:34:17.377 回答