Sha256: c89d890c3b0ba3e7c53d1474b3931ba5caa58c3ad2b57cd550133e271dc89528

Contents?: true

Size: 967 Bytes

Versions: 19

Compression:

Stored size: 967 Bytes

Contents

module Fastlane
  module Actions
    module SharedValues
      PRODUCE_APPLE_ID = :PRODUCE_APPLE_ID
    end

    class ProduceAction
      def self.run(params)
        require 'produce'

        hash = params.first || {}
        raise 'Parameter of produce must be a hash'.red unless hash.is_a?(Hash)

        hash.each do |key, value|
          ENV[key.to_s.upcase] = value.to_s
        end

        return if Helper.test?

        Dir.chdir(FastlaneFolder.path || Dir.pwd) do
          # This should be executed in the fastlane folder

          CredentialsManager::PasswordManager.shared_manager(ENV['PRODUCE_USERNAME']) if ENV['PRODUCE_USERNAME']
          Produce::Config.shared_config # to ask for missing information right in the beginning

          apple_id = Produce::Manager.start_producing.to_s

          Actions.lane_context[SharedValues::PRODUCE_APPLE_ID] = apple_id
          ENV['PRODUCE_APPLE_ID'] = apple_id
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fastlane-0.6.1 lib/fastlane/actions/produce.rb
fastlane-0.6.0 lib/fastlane/actions/produce.rb
fastlane-0.5.0 lib/fastlane/actions/produce.rb
fastlane-0.4.2 lib/fastlane/actions/produce.rb
fastlane-0.4.1 lib/fastlane/actions/produce.rb
fastlane-0.4.0 lib/fastlane/actions/produce.rb
fastlane-0.3.0 lib/fastlane/actions/produce.rb
fastlane-0.2.1 lib/fastlane/actions/produce.rb
fastlane-0.2.0 lib/fastlane/actions/produce.rb
fastlane-0.1.19 lib/fastlane/actions/produce.rb
fastlane-0.1.18 lib/fastlane/actions/produce.rb
fastlane-0.1.17 lib/fastlane/actions/produce.rb
fastlane-0.1.16 lib/fastlane/actions/produce.rb
fastlane-0.1.15 lib/fastlane/actions/produce.rb
fastlane-0.1.14 lib/fastlane/actions/produce.rb
fastlane-0.1.13 lib/fastlane/actions/produce.rb
fastlane-0.1.12 lib/fastlane/actions/produce.rb
fastlane-0.1.10 lib/fastlane/actions/produce.rb
fastlane-0.1.9 lib/fastlane/actions/produce.rb