lhj-tools 0.1.40 → 0.1.41

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ece2424980560cc08874ad875b48bbe10430ac55004ab9e1a1999d7b3fd2595b
4
- data.tar.gz: 353552a9c1da8537b64befffeae9bcb9b89d86c1a1d9e70f0545933ef105eb68
3
+ metadata.gz: c8fa90967ee885cff64ed4b4d175cf1178919449b42aa8e644ad5fedf17386de
4
+ data.tar.gz: 750834e640eb75b5653e4f9639dc9b09bf5c320ac34bf721ab637f881729fc08
5
5
  SHA512:
6
- metadata.gz: 54b3713b1593883316dade8c04e69ad7b97de6fcc1e70c457fb61b6732cf907f3ecae44bd5281db9470e3632d533a76a03968dd342ac9863e903dcb78bd68f11
7
- data.tar.gz: 4c11133c0fdfddf32b1f87fbcd9b0d669b35740b4d8ae3c2b9f488316afb454630779ca2121943776575da7b2f46d1759195fa9cc02f75ea732042e8218f1b03
6
+ metadata.gz: b08ab0ab7d6bb7ac5fe0e38bd823032779370b4e6265444db96f691078502d10c199656297b7190f1eaa1be92a76c701f6ec1c467aede28c49464853ccb1add1
7
+ data.tar.gz: 1a546488cdfca768c14599022da2d80cb5eca23a272d71fbc75b879b74a2f9d99d9574afae62316fad2cd7ebd54010a001396219a5b42eec7f065ba87f09d6cc
@@ -18,6 +18,7 @@ module Lhj
18
18
  @api_key = Lhj::PgyerConfig.api_key(env)
19
19
  @user_key = Lhj::PgyerConfig.user_key(env)
20
20
  @password = Lhj::PgyerConfig.password(env)
21
+ @env = env
21
22
  @result = { 'data' => {} }
22
23
  end
23
24
 
@@ -38,7 +39,6 @@ module Lhj
38
39
  end
39
40
 
40
41
  def upload_file(file, des)
41
-
42
42
  update_description = @result[:update_description]
43
43
  update_description = '' if update_description.nil?
44
44
  params = {
@@ -49,6 +49,7 @@ module Lhj
49
49
  'installType' => 2,
50
50
  'file' => Faraday::UploadIO.new(file, 'application/octet-stream')
51
51
  }
52
+ upload_code
52
53
  begin
53
54
  puts 'begin upload...'
54
55
  response = http_client.post API_HOST, params
@@ -65,6 +66,15 @@ module Lhj
65
66
  end
66
67
  end
67
68
 
69
+ def upload_code
70
+ if @env == :release
71
+ # packing
72
+ current_dir = File.dirname(__FILE__)
73
+ puts current_dir
74
+ # upload to oss
75
+ end
76
+ end
77
+
68
78
  def render_template
69
79
  temp_str = File.read(File.join(Lhj::Config.instance.home_dir, 'pgyer.erb'))
70
80
  Lhj::ErbFormatter::Service.new(self).render_template(temp_str)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lhj
4
4
  module Tools
5
- VERSION = "0.1.40"
5
+ VERSION = "0.1.41"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian