produce/lib/produce/commands_generator.rb in fastlane-2.102.0 vs produce/lib/produce/commands_generator.rb in fastlane-2.103.0

- old
+ new

@@ -150,9 +150,43 @@ require 'produce/group' Produce::Group.new.associate(options, args) end end + command :cloud_container do |c| + c.syntax = 'fastlane produce cloud_container' + c.description = 'Ensure that a specific iCloud Container exists' + c.example('Create iCloud Container', 'fastlane produce cloud_container -g iCloud.com.example.app -n "Example iCloud Container"') + + c.option('-n', '--container_name STRING', String, 'Name for the iCloud Container that is created (PRODUCE_CLOUD_CONTAINER_NAME)') + c.option('-g', '--container_identifier STRING', String, 'Identifier for the iCloud Container (PRODUCE_CLOUD_CONTAINER_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/cloud_container' + Produce::CloudContainer.new.create(options, args) + end + end + + command :associate_cloud_container do |c| + c.syntax = 'fastlane produce associate_cloud_container -a APP_IDENTIFIER CONTAINER_IDENTIFIER1, CONTAINER_IDENTIFIER2, ...' + c.description = 'Associate with a iCloud Container, which is created if needed or simply located otherwise' + c.example('Associate with iCloud Container', 'fastlane produce associate_cloud_container -a com.example.app iCloud.com.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/cloud_container' + Produce::CloudContainer.new.associate(options, args) + end + end + command :merchant do |c| c.syntax = 'fastlane produce merchant' c.description = 'Ensure that a specific Merchant exists' c.example('Create merchant', 'fastlane produce merchant -o merchant.com.example.production -r "Example Merchant Production"')