INNER CODE UNIT · Ruby

GetBuildNumberFromPlistAction

SiarheiFedartsou/fastlane-plugin-versioning · lib/fastlane/plugin/versioning/actions/get_build_number_from_plist.rb:3

    class GetBuildNumberFromPlistAction < Action
      def self.run(params)
        if Helper.test?
          plist = "/tmp/fastlane/tests/fastlane/plist/Info.plist"
        else
          plist = GetInfoPlistPathAction.run(params)
        end

        if params[:plist_build_setting_support]
          UI.important "build number will originate from xcodeproj"
          build_number = GetBuildNumberFromXcodeprojAction.run(params)
        else
          UI.important "build number will originate from plist."
          build_number = GetInfoPlistValueAction.run(path: plist, key: 'CFBundleVersion')
        end

        # Store the number in the shared hash
        Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…