class XCJobs::Distribute::Crashlytics
Attributes
api_key[RW]
build_secret[RW]
file[RW]
framework_path[RW]
notes[RW]
notifications[RW]
Public Class Methods
new() { |self| ... }
click to toggle source
# File lib/xcjobs/distribute.rb, line 132 def initialize() @notifications = true @emails = [] @group_aliases = [] yield self if block_given? define end
Public Instance Methods
add_email(email)
click to toggle source
# File lib/xcjobs/distribute.rb, line 140 def add_email(email) @emails << email end
add_group_alias(group_alias)
click to toggle source
# File lib/xcjobs/distribute.rb, line 144 def add_group_alias(group_alias) @group_aliases << group_alias end
Private Instance Methods
define()
click to toggle source
# File lib/xcjobs/distribute.rb, line 150 def define namespace :distribute do desc 'upload IPA to Beta by Crashlytics' task :crashlytics do @before_action.call if @before_action sh *(["#{File.join(framework_path, 'submit')}"] + options) @after_action.call('', SystemExit.new) if @after_action end end end
options()
click to toggle source
# File lib/xcjobs/distribute.rb, line 161 def options [].tap do |opts| opts << api_key opts << build_secret opts.concat(['-ipaPath', file]) if file opts.concat(['-notifications', 'NO']) unless notifications opts.concat(['-emails', @emails.join(',')]) unless @emails.empty? opts.concat(['-groupAliases', @group_aliases.join(',')]) unless @group_aliases.empty? if notes temp = Tempfile.new('release_notes.txt') temp.puts(notes) temp.flush opts.concat(['-notesPath', temp.path]) end end end