Class: Lhj::BuglyHelper
- Inherits:
-
Object
- Object
- Lhj::BuglyHelper
- Defined in:
- lib/lhj/helper/bugly_helper.rb
Overview
bugly helper
Constant Summary collapse
- BUGLY_JAR =
'buglyqq-upload-symbol.jar'.freeze
Class Method Summary collapse
Class Method Details
.upload_sym(app_id, app_key, bundle_id, version, input_symbol) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lhj/helper/bugly_helper.rb', line 9 def self.upload_sym(app_id, app_key, bundle_id, version, input_symbol) file = File.join(Lhj::Config.instance.home_dir, BUGLY_JAR) Lhj::OSS::Helper.instance.down_load("bugly/#{BUGLY_JAR}", file) unless File.exist?(file) # zip_path = Dir['*.app.dSYM.zip'].first # Action.sh("unzip -qo '#{zip_path}' -d dsym") if zip_path sym_path = input_symbol sym_path = input_symbol.shellescape if %r{[^A-Za-z0-9_\-.,:+/@\n]} =~ input_symbol command = %w[java -jar] command << "#{Lhj::Config.instance.home_dir}/#{BUGLY_JAR}" command << "-appid #{app_id}" command << "-appkey #{app_key}" command << "-bundleid #{bundle_id}" command << "-version #{version}" command << '-platform IOS' command << "-inputSymbol #{sym_path}" # puts command.join(' ') Actions.sh(command.join(' '), log: true) end |