Sha256: b6f7e9005fc06ae553d8421added871e0a23af8b300ebe147b0b86d71064c548

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 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

      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 #{input_symbol}"
      # 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.12 lib/lhj/helper/bugly_helper.rb