Class: Fastlane::Apprepo::Analyser

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/apprepo/analyser.rb,
lib/fastlane/plugin/apprepo/helper/analyser.rb

Overview

Should provide metadata for current appcode

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Analyser

Returns a new instance of Analyser.



15
16
17
# File 'lib/fastlane/plugin/apprepo/analyser.rb', line 15

def initialize(options)
  self.options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



13
14
15
# File 'lib/fastlane/plugin/apprepo/analyser.rb', line 13

def options
  @options
end

Instance Method Details

#fetch_app_version(options) ⇒ Object

Fetches remote app version from metadata



20
21
22
23
24
25
26
# File 'lib/fastlane/plugin/apprepo/analyser.rb', line 20

def fetch_app_version(options)
   = Apprepo::Uploader.new(options).download_manifest_only
  FastlaneCore::UI.command_output('TODO: Parse version out from metadata')
  puts JSON.pretty_generate() unless .nil?
  FastlaneCore::UI.important('TODO: parse out the bundle-version')
  ['bundle-version']
end

#runObject

only for testing, should be empty



29
30
31
32
# File 'lib/fastlane/plugin/apprepo/analyser.rb', line 29

def run
  FastlaneCore::UI.message('Analyser run, will fetch_app_version...')
  fetch_app_version(options)
end