gpt4 book ai didi

ruby - 获取 Fastfile 中的 lane 名称

转载 作者:太空宇宙 更新时间:2023-11-03 17:43:47 29 4
gpt4 key购买 nike

我正在为 faSTLane 设置一个 Fastfile,我正在尝试打开 faSTLane 正在运行的 channel 名称。

假设我运行 faSTLane wow

在这个 Fastfile 中,我想获取调用 faSTLane 的当前 channel 的名称,即 "wow":

wowness = (lane[:lane-name] == "wow" ? "Much wow" : "Not so wow")
puts wowness

lane :wow do |options|
puts "print something random"
end

据我所知,faSTLane 使用 Ruby,所以也许这就是可行的方法?

最佳答案

ENV["FASTLANE_LANE_NAME"] 
# or
lane_context[SharedValues::LANE_NAME]

引用:https://docs.fastlane.tools/advanced/lanes/#lane-properties

关于ruby - 获取 Fastfile 中的 lane 名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46184834/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com