Sha256: ca644eec13a9cdc8e91174327496d15097703fb4c5cce325bb7a3f240eba1946

Contents?: true

Size: 1.99 KB

Versions: 51

Compression:

Stored size: 1.99 KB

Contents

module Fastlane
  module Actions
    module SharedValues
      PRODUCE_APPLE_ID = :PRODUCE_APPLE_ID
    end

    class CreateAppOnlineAction < Action
      def self.run(params)
        require 'produce'

        return if Helper.test?

        Produce.config = params # we alread have the finished config

        Dir.chdir(FastlaneCore::FastlaneFolder.path || Dir.pwd) do
          # This should be executed in the fastlane folder
          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

      def self.description
        "Creates the given application on iTC and the Dev Portal (via _produce_)"
      end

      def details
        [
          'Create new apps on iTunes Connect and Apple Developer Portal via _produce_.',
          'If the app already exists, `create_app_online` will not do anything.',
          'For more information about produce, visit its GitHub page:',
          'https://github.com/fastlane/fastlane/tree/master/produce'
        ].join(' ')
      end

      def self.available_options
        require 'produce'
        Produce::Options.available_options
      end

      def self.output
        [
          ['PRODUCE_APPLE_ID', 'The Apple ID of the newly created app. You probably need it for `deliver`']
        ]
      end

      def self.author
        "KrauseFx"
      end

      def self.is_supported?(platform)
        platform == :ios
      end

      def self.example_code
        [
          'create_app_online(
            username: "felix@krausefx.com",
            app_identifier: "com.krausefx.app",
            app_name: "MyApp",
            language: "English",
            app_version: "1.0",
            sku: "123",
            team_name: "SunApps GmbH" # Only necessary when in multiple teams.
          )',
          'produce   # alias for "create_app_online"'
        ]
      end

      def self.category
        :misc
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
fastlane-2.71.0.beta.20171222010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.3 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.71.0.beta.20171221010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.2 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.71.0.beta.20171220010004 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.71.0.beta.20171219010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.1 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.0 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.0.beta.20171217010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.0.beta.20171216010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.0.beta.20171215010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.3 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.0.beta.20171214010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.2 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.1 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.70.0.beta.20171213010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.0 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.0.beta.20171212010004 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.0.beta.20171211010003 fastlane/lib/fastlane/actions/create_app_online.rb
fastlane-2.69.0.beta.20171210010003 fastlane/lib/fastlane/actions/create_app_online.rb