Class: Fastlane::Actions::PrototypeBuildDetailsCommentAction::FirebaseReleaseInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb

Overview

A small model/struct representing values exposed by Firebase App Distribution for a given release

Helpers collapse

Helpers collapse

Instance Attribute Details

#build_versionObject

Returns the value of attribute build_version

Returns:

  • (Object)

    the current value of build_version



74
75
76
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 74

def build_version
  @build_version
end

#bundle_idObject

Returns the value of attribute bundle_id

Returns:

  • (Object)

    the current value of bundle_id



74
75
76
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 74

def bundle_id
  @bundle_id
end

#display_versionObject

Returns the value of attribute display_version

Returns:

  • (Object)

    the current value of display_version



74
75
76
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 74

def display_version
  @display_version
end

#osObject

Returns the value of attribute os

Returns:

  • (Object)

    the current value of os



74
75
76
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 74

def os
  @os
end

#release_idObject

Returns the value of attribute release_id

Returns:

  • (Object)

    the current value of release_id



74
75
76
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 74

def release_id
  @release_id
end

#testing_urlObject

Returns the value of attribute testing_url

Returns:

  • (Object)

    the current value of testing_url



74
75
76
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 74

def testing_url
  @testing_url
end

Class Method Details

.from_lane_contextObject



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb', line 75

def self.from_lane_context
  return nil unless defined?(SharedValues::FIREBASE_APP_DISTRO_RELEASE)

  ctx = Fastlane::Actions.lane_context[SharedValues::FIREBASE_APP_DISTRO_RELEASE]
  return nil if ctx.nil?

  # Extract platform info from Firebase Console URI
  if ctx[:firebaseConsoleUri]
    uri = URI(ctx[:firebaseConsoleUri])
    os, bundle_id, release_id = uri.path.match(%r{project/.*/appdistribution/app/([^:]*):([^/]*)/releases/(.*)})&.captures
  end

  new(
    display_version: ctx[:displayVersion],
    build_version: ctx[:buildVersion],
    testing_url: ctx[:testingUri],
    os: os,
    bundle_id: bundle_id,
    release_id: release_id
  )
end