Class: Supply::Reader

Inherits:
Object
  • Object
show all
Defined in:
supply/lib/supply/reader.rb

Instance Method Summary collapse

Instance Method Details

#track_release_namesObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'supply/lib/supply/reader.rb', line 19

def track_release_names
  track = Supply.config[:track]

  client.begin_edit(package_name: Supply.config[:package_name])
  release_names = client.track_releases(track).map(&:name)
  client.abort_current_edit

  if release_names.empty?
    UI.important("No release names found in track '#{track}'")
  else
    UI.success("Found '#{release_names.join(', ')}' release names in track '#{track}'")
  end

  release_names
end

#track_version_codesObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'supply/lib/supply/reader.rb', line 3

def track_version_codes
  track = Supply.config[:track]

  client.begin_edit(package_name: Supply.config[:package_name])
  version_codes = client.track_version_codes(track)
  client.abort_current_edit

  if version_codes.empty?
    UI.important("No version codes found in track '#{track}'")
  else
    UI.success("Found '#{version_codes.join(', ')}' version codes in track '#{track}'")
  end

  version_codes
end