lhj-tools 0.1.50 → 0.1.53

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: 810851bc3251dbf4888b5a976596d4dcd1ed87ec170d78732642990d7b3d67b8
4
- data.tar.gz: 5e8601cac6d629695d822bbf42faf5b79cd306dd9f3042306d8600ab944dbeb3
3
+ metadata.gz: b7b3a7e3757035f3306fd09213009b4558445763b02c74c40b86e7016a7088ef
4
+ data.tar.gz: 86c4e51a41826d0eca77d839bdb8735471737b94452a2e82688e4ca537162721
5
5
  SHA512:
6
- metadata.gz: e3286d019af2bc6c21af68112692762a39cee02086103ddcd203661fd7e4f94902f0940d6b7c28b8193d747409e96e3b74f32c1bcf32497ebafbf924275ff95c
7
- data.tar.gz: e0455f6b52cc94bedd96fd23ecd07118265d610eb5269ec3c4ecff183382e0196be21a3f74d43845d13514673764dc6acef042a9fe7d7053085830cbe312e1e1
6
+ metadata.gz: 21efdee7795596ff21d051a36ed81d4a4828482ec35639832c08524eca2e9ca39b66d96b78f10c32b012ae4509744df493deecc01b823c3e1396f1806c03d572
7
+ data.tar.gz: a2a0d03aeb156b1a7bc4d12a4590dd45b8e595bb3fe5a8d17681b109140a2a7e34b9bd28aa1dea065e76951b01953a2f4753f842e8aa0974c6034db6b9b55c56
@@ -0,0 +1,43 @@
1
+ require 'lhj/config'
2
+ require 'highline'
3
+ require 'lhj/helper/pod_repo_config'
4
+
5
+ module Lhj
6
+ class Command
7
+ # sync code to pod
8
+ class SyncPodCode < Command
9
+ self.summary = '同步代码到目标目录'
10
+
11
+ def initialize(argv)
12
+ @cli = HighLine.new
13
+ super
14
+ end
15
+
16
+ def begin_title
17
+ '读取映射文件~/.lhj/pod_config.yml'
18
+ end
19
+
20
+ def handle
21
+ sync
22
+ end
23
+
24
+ def sync
25
+ config_file = File.join(Lhj::Config.instance.home_dir, 'pod_config.yml')
26
+ arr = YAML.load_file(config_file)
27
+ arr.each_index { |i| puts "#{i}.#{arr[i]['pod']}".yellow }
28
+ idx = @cli.ask('请选择哪一个库同步: '.green).strip.to_i
29
+ src = arr[idx]['main_path']
30
+ dest = arr[idx]['pod_path']
31
+ FileUtils.cp_r(src, dest, remove_destination: true)
32
+ puts '1.从主工程复制代码到pod库成功'.green
33
+
34
+ Dir.chdir(dest) do
35
+
36
+ Actions.sh('git add .')
37
+ puts '2.git add成功'.green
38
+
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
data/lib/lhj/command.rb CHANGED
@@ -27,6 +27,7 @@ module Lhj
27
27
  require 'lhj/command/http'
28
28
  require 'lhj/command/sync_pod_repo'
29
29
  require 'lhj/command/sync_pod_version'
30
+ require 'lhj/command/sync_pod_code'
30
31
  require 'lhj/command/pgyer_upload'
31
32
  require 'lhj/command/duplicate_imageset'
32
33
  require 'lhj/command/jenkins_build'
@@ -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,11 +64,11 @@ module Lhj
64
64
  @result = response.body
65
65
  puts @result
66
66
  puts 'upload success'
67
- if @result['data'] && @result['data']['appUpdateDescription'] && @env == :uat
68
- str = Lhj::TbHelper.trans_tb(@result['data']['appUpdateDescription'])
69
- str = Lhj::VikaHelper.trans_vika(str)
70
- @result['data']['appUpdateDescription'] = str
71
- end
67
+ # if @result['data'] && @result['data']['appUpdateDescription'] && @env == :uat
68
+ # str = Lhj::TbHelper.trans_tb(@result['data']['appUpdateDescription'])
69
+ # str = Lhj::VikaHelper.trans_vika(str)
70
+ # @result['data']['appUpdateDescription'] = str
71
+ # end
72
72
  rescue Faraday::TimeoutError
73
73
  puts 'upload fail'
74
74
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lhj
4
4
  module Tools
5
- VERSION = "0.1.50"
5
+ VERSION = "0.1.53"
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.50
4
+ version: 0.1.53
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-15 00:00:00.000000000 Z
11
+ date: 2022-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -320,6 +320,7 @@ files:
320
320
  - lib/lhj/command/refactor_rename.rb
321
321
  - lib/lhj/command/rename_image.rb
322
322
  - lib/lhj/command/reverse_import.rb
323
+ - lib/lhj/command/sync_pod_code.rb
323
324
  - lib/lhj/command/sync_pod_repo.rb
324
325
  - lib/lhj/command/sync_pod_version.rb
325
326
  - lib/lhj/command/template.rb