簡體   English   中英

如何在Fastlane的命令行中指定用戶名?

[英]How to specify username in the command line for Fastlane?

我正在嘗試將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.sh似乎完全沒有被Fastlane注意到, apple_id:nlocking@whisper.sh-u nlocking@whisper.sh以及我嘗試的其他所有內容。 我究竟做錯了什么?

嘗試刪除用戶名,只添加app_identifierapple_id (電子郵件)和team_id在Appfile

它將在您的fastlane/Appfile使用apple_id的值。 確保從fastlane/所在的文件夾中運行命令。

不確定hockeyglobal lane,但通常傳遞username參數的正確語法如下:

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

例如,對於默認cert通道,這適用:

 fastlane cert --username 'me@myemailcom'

要么

 fastlane cert -u 'me@myemailcom'

我通過使用fastlane參數實現了這一點。 在你的Fastfile中做這樣的事情:

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

(注意上面的|options|參數)

然后像這樣調用fastlane:

fastlane beta username:email@example.com

其中email@example.com是您的用戶名。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM