Sha256: 0293c48bb5c2e69d4c2ae89a51cc01ebe9de6f3fa1dee4d5737233e47582e215

Contents?: true

Size: 987 Bytes

Versions: 1

Compression:

Stored size: 987 Bytes

Contents

module Lhj
  # bugly helper
  class BuglyHelper

    BUGLY_JAR = 'buglyqq-upload-symbol.jar'

    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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lhj-tools-0.2.13 lib/lhj/helper/bugly_helper.rb