[英]How to specify username in the command line for Fastlane?
I'm trying to pass in the apple ID to Fastlane as a command line option so all users and our build servers can use the same script. 我正在尝试将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:
Maddeningly, username:nlocking@whisper.sh
seems to go completely unnoticed by Fastlane, as does apple_id:nlocking@whisper.sh
, -u nlocking@whisper.sh
and everything else I've tried. 疯狂地, username:nlocking@whisper.sh
似乎完全没有被Fastlane注意到, apple_id:nlocking@whisper.sh
, -u nlocking@whisper.sh
以及我尝试的其他所有内容。 What am I doing wrong? 我究竟做错了什么?
尝试删除用户名,只添加app_identifier
, apple_id
(电子邮件)和team_id
在Appfile
It will use the value of apple_id
in your fastlane/Appfile
. 它将在您的fastlane/Appfile
使用apple_id
的值。 Make sure you're running the command from the folder that fastlane/
is in. 确保从fastlane/
所在的文件夹中运行命令。
Not sure about the hockeyglobal
lane, but generally the correct syntax to pass the username
parameter would be as follows: 不确定hockeyglobal
lane,但通常传递username
参数的正确语法如下:
fastlane hockeyglobal --username 'nlocking@whisper.sh'
Eg for default cert
lane this works: 例如,对于默认cert
通道,这适用:
fastlane cert --username 'me@myemailcom'
or 要么
fastlane cert -u 'me@myemailcom'
I achieved this by using fastlane parameters. 我通过使用fastlane参数实现了这一点。 In your Fastfile do something like this: 在你的Fastfile中做这样的事情:
lane :beta do |options|
cert(username: options[:username])
...
end
(notice the |options|
parameter above) (注意上面的|options|
参数)
Then invoke fastlane like this: 然后像这样调用fastlane:
fastlane beta username:email@example.com
Where email@example.com is your username. 其中email@example.com是您的用户名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.