信息通道,显示当前升级的版本代码

时间:2018-08-15 06:41:44

标签: fastlane

根据the documentation of fastlane supply,可以“提供一条显示生产轨道当前升级版本代码的信息通道”。

我将如何具体地做到这一点?我看过很多文档,但仍然不明白。

预先感谢, 伯特

1 个答案:

答案 0 :(得分:1)

您可以像这样使用动作google_play_track_version_codes

lane :output_promoted_version_codes do
  UI.message("Promoted version code (production): #{google_play_track_version_codes}")
  UI.message("Promoted version code (beta): #{google_play_track_version_codes(track: "beta")}")
end

通过fastlane android output_promoted_version_codes运行此车道时,将获得类似于以下的输出:

...
[10:59:02]: Driving the lane 'android output_promoted_version_codes' 
[10:59:02]: ---------------------------------------------
[10:59:02]: --- Step: google_play_track_version_codes ---
[10:59:02]: ---------------------------------------------
[10:59:06]: Found '3' version codes in track 'production'
[10:59:06]: Promoted version code (production): [3]
[10:59:06]: ---------------------------------------------
[10:59:06]: --- Step: google_play_track_version_codes ---
[10:59:06]: ---------------------------------------------
[10:59:08]: No version codes found in track 'beta'
[10:59:08]: Promoted version code (beta): []
...