lhj-tools 0.1.48 → 0.1.51

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: 98c79bee846ee40347cbf2c34c2315574cc66d9f7745e0f9668be75cb2cbe6bb
4
- data.tar.gz: e86ccbb315e7d6e8e9b0b07e468bc25fc3efa9fcd688deb0ec903e411de1ba60
3
+ metadata.gz: de06842336189852e95b075ad1453d775ba3c6772d4a65992137231184d4fbb3
4
+ data.tar.gz: 39afffe676c83d5813cfa161fe9973099783198452695e84441a15caaad9cd26
5
5
  SHA512:
6
- metadata.gz: f6f529d7ccc9a3e3999e9cceca6b4b92b779249bffe537807ebf313e5e74c3063231db450a0b88737144a80babd6f69b079d70ce7fe7f4bbc15a3fff5dbbf621
7
- data.tar.gz: f32d8f5ec2800d52352aa78e6a729032a62484e8e8306a53f2dd22cd37a4765b41f17588c16ce07d0e8f5402ef8a4ec9f0f3419c83780071b12f838809cc352f
6
+ metadata.gz: d8f6b7401acebd536537b2230222a67bb2f35ff544a5b5a6c23732176a1d221617e4ddf7eefe1f17d0a8195230722b708581b350cab33c3e2027badf4406cd30
7
+ data.tar.gz: 7957577a7f52e83aca575f09300e01b78e2737db0844c72ace6d4103546386c40e967ecb2cef7d4b5f758b81cac11892b5db77f26cdf7690f75edd682e915424
@@ -39,7 +39,7 @@ module Lhj
39
39
  end
40
40
 
41
41
  def pod_folder_name
42
- File.join(@current_path, 'MacauLife', 'CustomPods')
42
+ File.join(@current_path, 'CustomPods')
43
43
  end
44
44
 
45
45
  def child_dir
@@ -24,6 +24,11 @@ module Lhj
24
24
  name.split('/').last
25
25
  end
26
26
 
27
+ def current_branch(path)
28
+ name = Lhj::Actions.git_branch || ''
29
+ name.split('/').last
30
+ end
31
+
27
32
  def fetch_feature
28
33
  Lhj::GitBranchFeatureConfig.feature(@branch)
29
34
  end
@@ -64,7 +64,7 @@ module Lhj
64
64
  @result = response.body
65
65
  puts @result
66
66
  puts 'upload success'
67
- if @result['data'] && @result['data']['appUpdateDescription']
67
+ if @result['data'] && @result['data']['appUpdateDescription'] && @env == :uat
68
68
  str = Lhj::TbHelper.trans_tb(@result['data']['appUpdateDescription'])
69
69
  str = Lhj::VikaHelper.trans_vika(str)
70
70
  @result['data']['appUpdateDescription'] = str
@@ -76,18 +76,18 @@ module Lhj
76
76
 
77
77
  def upload_with_type(path, file)
78
78
  return unless @env == :release
79
+ return unless /hai/ =~ path
79
80
 
80
81
  # step 1
81
82
  folder_path_dir = path
82
83
  rand_key = rand(100) % 3
83
- zipped_path = "Life_i_#{rand_key}.zip"
84
- zipped_path = "Life_a_#{rand_key}.zip" unless file.end_with?('.ipa')
85
- # Actions.sh(%(cd "#{folder_path_dir}" && zip -r "#{zipped_path}" "#{folder_path_dir}"/*), log: false)
86
- Actions.sh(%(cd "#{folder_path_dir}" && zip -r "#{zipped_path}" "#{folder_path_dir}"/* -x="#{folder_path_dir}"/Code/MacauLife.ipa), log: false)
87
-
84
+ zipped_name = "archive_#{rand_key}.zip"
85
+ zipped_name = "archive_a_#{rand_key}.zip" unless file.end_with?('.ipa')
86
+ command = %(cd #{folder_path_dir} && zip -r #{zipped_name} #{folder_path_dir}/* -x "*.ipa" -x "*.dSYM.zip")
87
+ Actions.sh(command, log: false)
88
88
  # step 2
89
- oss_key = "code/#{zipped_path}"
90
- oss_file = File.join(folder_path_dir, zipped_path)
89
+ oss_key = "code/#{zipped_name}"
90
+ oss_file = File.join(folder_path_dir, zipped_name)
91
91
  file_exists = File.exist?(oss_file)
92
92
  return unless file_exists
93
93
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lhj
4
4
  module Tools
5
- VERSION = "0.1.48"
5
+ VERSION = "0.1.51"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.48
4
+ version: 0.1.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-13 00:00:00.000000000 Z
11
+ date: 2022-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide