fastlane 可以在某些通道中跳过 `before_all` 或 `after_all` 吗?
Can fastlane skip `before_all` or `after_all` in certain lanes?
我想知道是否有一种方法可以让某些车道跳过 before_all
或 after_all
街区以用于 certain/specified 车道?
谢谢!
一种方法:
before_all do |lane|
if lane == :test
puts "Do something for test"
else
puts "foo"
end
end
与您的评论相关的补充
lanes = [:test, :foo, :bar]
lanes.include?(:test) # => true
lanes.include?(:baz) # => false
所以你可以做类似的事情
before_all do |lane|
lanes_to_say_foo = [:test, :build, :other]
if lanes_to_say_foo.include?(lane)
puts "Foo"
end
end
我想知道是否有一种方法可以让某些车道跳过 before_all
或 after_all
街区以用于 certain/specified 车道?
谢谢!
一种方法:
before_all do |lane|
if lane == :test
puts "Do something for test"
else
puts "foo"
end
end
与您的评论相关的补充
lanes = [:test, :foo, :bar]
lanes.include?(:test) # => true
lanes.include?(:baz) # => false
所以你可以做类似的事情
before_all do |lane|
lanes_to_say_foo = [:test, :build, :other]
if lanes_to_say_foo.include?(lane)
puts "Foo"
end
end