produce/lib/produce/commands_generator.rb in fastlane-2.18.0.beta.20170217010035 vs produce/lib/produce/commands_generator.rb in fastlane-2.18.0.beta.20170218010103

- old
+ new

@@ -20,16 +20,16 @@ program :help, 'GitHub', 'https://github.com/fastlane/produce' program :help_formatter, :compact global_option('--verbose') { FastlaneCore::Globals.verbose = true } - FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options) - command :create do |c| c.syntax = 'fastlane produce create' c.description = 'Creates a new app on iTunes Connect and the Apple Developer Portal' + FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c) + c.action do |args, options| Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__) puts Produce::Manager.start_producing end @@ -54,10 +54,12 @@ c.option '--passbook', 'Enable Passbook' c.option '--push-notification', 'Enable Push notification (only enables the service, does not configure certificates)' c.option '--sirikit', 'Enable SiriKit' c.option '--vpn-conf', 'Enable VPN Configuration' + FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c) + c.action do |args, options| # Filter the options so that we can still build the configuration allowed_keys = Produce::Options.available_options.collect(&:key) Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key }) @@ -85,10 +87,12 @@ c.option '--passbook', 'Disable Passbook' c.option '--push-notification', 'Disable Push notifications' c.option '--sirikit', 'Disable SiriKit' c.option '--vpn-conf', 'Disable VPN Configuration' + FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c) + c.action do |args, options| # Filter the options so that we can still build the configuration allowed_keys = Produce::Options.available_options.collect(&:key) Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key }) @@ -103,10 +107,12 @@ c.example 'Create group', 'produce group -g group.example.app -n "Example App Group"' c.option '-n', '--group_name STRING', String, 'Name for the group that is created (PRODUCE_GROUP_NAME)' c.option '-g', '--group_identifier STRING', String, 'Group identifier for the group (PRODUCE_GROUP_IDENTIFIER)' + FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c) + c.action do |args, options| allowed_keys = Produce::Options.available_options.collect(&:key) Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__.select { |key, value| allowed_keys.include? key }) require 'produce/group' @@ -116,9 +122,11 @@ command :associate_group do |c| c.syntax = 'fastlane produce associate_group -a APP_IDENTIFIER GROUP_IDENTIFIER1, GROUP_IDENTIFIER2, ...' c.description = 'Associate with a group, which is created if needed or simply located otherwise' c.example 'Associate with group', 'produce associate-group -a com.example.app group.example.com' + + FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c) c.action do |args, options| Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, options.__hash__) require 'produce/group'