Class: Fastlane::Apprepo::Runner
- Inherits:
-
Object
- Object
- Fastlane::Apprepo::Runner
- Defined in:
- lib/fastlane/plugin/apprepo/runner.rb,
lib/fastlane/plugin/apprepo/helper/runner.rb
Overview
Responsible for running
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #download_manifest ⇒ Object
-
#initialize(options) ⇒ Runner
constructor
A new instance of Runner.
- #notify ⇒ Object
-
#run ⇒ Object
rubocop:disable Metrics/AbcSize rubocop:disable Metrics/CyclomaticComplexity.
-
#upload_binary ⇒ Object
Upload the binary to Apprepo.
-
#verify_version ⇒ Object
Make sure the version on Apprepo matches the one in the ipa If not, the new version will automatically be created.
Constructor Details
#initialize(options) ⇒ Runner
Returns a new instance of Runner.
9 10 11 12 13 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 9 def initialize() self. = Apprepo::DetectValues.new.run!(self.) FastlaneCore::PrintTable.print_values(config: , hide_keys: [:repo_password], mask_keys: [:repo_key], title: "Apprepo-sftp #{Apprepo::VERSION} Summary") end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 7 def @options end |
Instance Method Details
#download_manifest ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 46 def download_manifest if [:manifest_path] uploader = Apprepo::Uploader.new() result = uploader.download_manifest_only msg = 'Metadata download failed. Check out the error above.' UI.user_error!(msg) unless result end end |
#notify ⇒ Object
65 66 67 68 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 65 def notify # should be in metadata # UI.command_output('TODO: Missing implementation for Apprepo Push Notifier') end |
#run ⇒ Object
rubocop:disable Metrics/AbcSize rubocop:disable Metrics/CyclomaticComplexity
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 17 def run UI.success('Apprepo SFTP Uploader running...') verify_version unless [:app_version].to_s.empty? has_binary = [:ipa] if ![:skip_binary_upload] && ![:build_number] && has_binary upload_binary UI.success('Finished the upload to Apprepo.') else UI.success('Binary upload skipped or no binary available.') end notify unless [:notify].nil? end |
#upload_binary ⇒ Object
Upload the binary to Apprepo
56 57 58 59 60 61 62 63 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 56 def upload_binary if [:ipa] uploader = Apprepo::Uploader.new() result = uploader.upload msg = 'Binary upload failed. Check out the error above.' UI.user_error!(msg) unless result end end |
#verify_version ⇒ Object
Make sure the version on Apprepo matches the one in the ipa If not, the new version will automatically be created
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/fastlane/plugin/apprepo/runner.rb', line 33 def verify_version app_version = [:app_version] msg = "TODO: Test if Apprepo matches '#{app_version}' from the IPA..." UI.(msg) # changed = options[:app].ensure_version!(app_version) # if changed # UI.success("Successfully set the version to '#{app_version}'") # else # UI.success("'#{app_version}' is the latest version on Apprepo") # end end |