Sha256: 9ba7032133a89fece19273d43da93f7fcd6a0dbc08dd07b2f9c33201498e28a9

Contents?: true

Size: 916 Bytes

Versions: 1

Compression:

Stored size: 916 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)

      Dir.chdir(input_symbol) do
        zip_path = Dir['*.app.dSYM.zip'].first
        Action.sh("unzip -qo '#{zip_path}' -d dsym") if zip_path
      end

      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: false)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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