Sha256: c4eb1c2be59322ce657c5125b9d05b7dd0154c0c2b1329cb3708c42c5d816436

Contents?: true

Size: 1.79 KB

Versions: 19

Compression:

Stored size: 1.79 KB

Contents

module Fastlane
  module Actions
    module SharedValues
    end

    class UpdateProjectTeamAction < Action
      def self.run(params)
        path = params[:path]
        path = File.join(path, "project.pbxproj")
        raise "Could not find path to project config '#{path}'. Pass the path to your project (not workspace)!".red unless File.exist?(path)

        Helper.log.info("Updating development team (#{params[:teamid]}) for the given project '#{path}'")

        p = File.read(path)
        File.write(path, p.gsub(/DevelopmentTeam = .*;/, "DevelopmentTeam = #{params[:teamid]};"))

        Helper.log.info("Successfully updated project settings to use Developer Team ID '#{params[:teamid]}'".green)
      end

      def self.description
        "Update Development Team ID"
      end

      def self.details
        "This action update the Developer Team ID of your Xcode Project."
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :path,
                                       env_name: "FL_PROJECT_SIGNING_PROJECT_PATH",
                                       description: "Path to your Xcode project",
                                       verify_block: proc do |value|
                                         raise "Path is invalid".red unless File.exist?(value)
                                       end),
          FastlaneCore::ConfigItem.new(key: :teamid,
                                       env_name: "FL_PROJECT_TEAM_ID",
                                       description: "The Team ID  you want to use",
                                       default_value: ENV["TEAM_ID"])
        ]
      end

      def self.author
        "lgaches"
      end

      def self.is_supported?(platform)
        [:ios, :mac].include?(platform)
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fastlane-1.66.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.65.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.64.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.63.1 lib/fastlane/actions/update_project_team.rb
fastlane-1.63.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.62.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.61.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.60.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.59.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.58.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.57.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.56.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.55.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.54.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.53.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.52.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.51.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.50.0 lib/fastlane/actions/update_project_team.rb
fastlane-1.49.0 lib/fastlane/actions/update_project_team.rb