<commit_before>module Fastlane
  module Actions
    module SharedValues
    end

    class DeliverAction < Action
      def self.run(config)
        require 'deliver'

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

        begin
          ENV['DELIVER_SCREENSHOTS_PATH'] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] # use snapshot's screenshots if there

          Dir.chdir(config[:deliver_file_path] || FastlaneFolder.path || Dir.pwd) do
            # This should be executed in the fastlane folder

            Deliver::Deliverer.new(nil,
                                   force: config[:force],
                                   is_beta_ipa: config[:beta],
                                   skip_deploy: config[:skip_deploy])

            if ENV['DELIVER_IPA_PATH'] # since IPA upload is optional
              Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = File.expand_path(ENV['DELIVER_IPA_PATH']) # deliver will store it in the environment
            end
          end
        ensure
          FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
        end
      end

      def self.description
        "Uses deliver to upload new app metadata and builds to iTunes Connect"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :force,
                                       env_name: "FL_DELIVER_FORCE",
                                       description: "Set to true to skip PDF verification",
                                       optional: true,
                                       default_value: false,
                                       is_string: false),
          FastlaneCore::ConfigItem.new(key: :beta,
                                       env_name: "FL_DELIVER_BETA",
                                       description: "Upload a new version to TestFlight",
                                       optional: true,
                                       default_value: false,
                                       is_string: false),
          FastlaneCore::ConfigItem.new(key: :skip_deploy,
                                       env_name: "FL_DELIVER_SKIP_DEPLOY",
                                       description: "Skip the submission of the app - it will only be uploaded",
                                       optional: true,
                                       default_value: false,<commit_msg>Logout after deliver action<commit_after>module Fastlane
  module Actions
    module SharedValues
    end

    class DeliverAction < Action
      def self.run(config)
        require 'deliver'

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

        begin
          ENV['DELIVER_SCREENSHOTS_PATH'] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] # use snapshot's screenshots if there

          Dir.chdir(config[:deliver_file_path] || FastlaneFolder.path || Dir.pwd) do
            # This should be executed in the fastlane folder

            Deliver::Deliverer.new(nil,
                                   force: config[:force],
                                   is_beta_ipa: config[:beta],
                                   skip_deploy: config[:skip_deploy])

            if ENV['DELIVER_IPA_PATH'] # since IPA upload is optional
              Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = File.expand_path(ENV['DELIVER_IPA_PATH']) # deliver will store it in the environment
            end

            # The user might used a different account for deliver
            CredentialsManager::PasswordManager.logout
          end
        ensure
          FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
        end
      end

      def self.description
        "Uses deliver to upload new app metadata and builds to iTunes Connect"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :force,
                                       env_name: "FL_DELIVER_FORCE",
                                       description: "Set to true to skip PDF verification",
                                       optional: true,
                                       default_value: false,
                                       is_string: false),
          FastlaneCore::ConfigItem.new(key: :beta,
                                       env_name: "FL_DELIVER_BETA",
                                       description: "Upload a new version to TestFlight",
                                       optional: true,
                                       default_value: false,
                                       is_string: false),
          FastlaneCore::ConfigItem.new(key: :skip_deploy,
                                       env_name: "FL_DELIVER_SKIP_DEPLOY",
                                       description: "Skip the submission of the app - it will only be uploaded",
                                       optional: true,
                                       default_value: false,
{'fraction_non_alphanumeric': 0.06392156862745098, 'fraction_numerical': 0.0, 'mean_word_length': 1.3670533642691416, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7296828', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1175, 'n_words': 290}