pilot/lib/pilot/commands_generator.rb in fastlane-2.40.0 vs pilot/lib/pilot/commands_generator.rb in fastlane-2.41.0.beta.20170623010027
- old
+ new
@@ -18,11 +18,11 @@
o
end
def handle_multiple(action, args, options)
mgr = Pilot::TesterManager.new
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
args.push(config[:email]) if config[:email] && args.empty?
args.push(UI.input("Email address of the tester: ")) if args.empty?
failures = []
args.each do |address|
config[:email] = address
@@ -54,11 +54,11 @@
c.description = "Uploads a new binary to Apple TestFlight"
FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.available_options, command: c)
c.action do |args, options|
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
Pilot::BuildManager.new.upload(config)
end
end
command :distribute do |c|
@@ -66,11 +66,11 @@
c.description = "Distribute a previously uploaded binary to Apple TestFlight"
FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.available_options, command: c)
c.action do |args, options|
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
Pilot::BuildManager.new.distribute(config)
end
end
command :builds do |c|
@@ -78,11 +78,11 @@
c.description = "Lists all builds for given application"
FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.available_options, command: c)
c.action do |args, options|
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
Pilot::BuildManager.new.list(config)
end
end
command :add do |c|
@@ -101,11 +101,11 @@
c.description = "Lists all registered testers, both internal and external"
FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.available_options, command: c)
c.action do |args, options|
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
Pilot::TesterManager.new.list_testers(config)
end
end
command :find do |c|
@@ -135,11 +135,11 @@
c.description = "Exports all external testers to a CSV file"
FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.available_options, command: c)
c.action do |args, options|
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
Pilot::TesterExporter.new.export_testers(config)
end
end
command :import do |c|
@@ -147,16 +147,22 @@
c.description = "Create external testers from a CSV file"
FastlaneCore::CommanderGenerator.new.generate(Pilot::Options.available_options, command: c)
c.action do |args, options|
- config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config = create_config(options)
Pilot::TesterImporter.new.import_testers(config)
end
end
default_command :help
run!
+ end
+
+ def create_config(options)
+ config = FastlaneCore::Configuration.create(Pilot::Options.available_options, convert_options(options))
+ config[:ipa] = File.expand_path(config[:ipa]) if config[:ipa]
+ return config
end
end
end