Sha256: a48ae90bd02a3844fcc383c39cce1799b3b8ddc92b63a7b98baa7ac24d36f2f4

Contents?: true

Size: 1.64 KB

Versions: 5

Compression:

Stored size: 1.64 KB

Contents

module Fastlane
  module Actions
    module SharedValues
      IPA_OUTPUT_PATH = :IPA_OUTPUT_PATH
      DSYM_OUTPUT_PATH = :DSYM_OUTPUT_PATH
    end

    class GymAction < Action
      def self.run(values)
        require 'gym'

        begin
          FastlaneCore::UpdateChecker.start_looking_for_update('gym') unless Helper.is_test?

          if values[:provisioning_profile_path].to_s.length == 0
            sigh_path = Actions.lane_context[Actions::SharedValues::SIGH_PROFILE_PATH] || ENV["SIGH_PROFILE_PATH"]
            values[:provisioning_profile_path] = File.expand_path(sigh_path) if sigh_path
          end
          
          absolute_ipa_path = File.expand_path(Gym::Manager.new.work(values))
          absolute_dsym_path = absolute_ipa_path.gsub(".ipa", ".app.dSYM.zip")

          Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_ipa_path
          Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path if File.exist?(absolute_dsym_path)
          ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_ipa_path # for deliver
          ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path if File.exist?(absolute_dsym_path)
          
          return absolute_ipa_path
        ensure
          FastlaneCore::UpdateChecker.show_update_status('gym', Gym::VERSION)
        end
      end

      def self.description
        "Easily build and sign your app using `gym`"
      end

      def self.author
        "KrauseFx"
      end

      def self.available_options
        require 'gym'
        Gym::Options.available_options
      end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fastlane-1.20.0 lib/fastlane/actions/gym.rb
fastlane-1.19.0 lib/fastlane/actions/gym.rb
fastlane-1.18.0 lib/fastlane/actions/gym.rb
fastlane-1.17.1 lib/fastlane/actions/gym.rb
fastlane-1.17.0 lib/fastlane/actions/gym.rb