lhj-tools 0.1.51 → 0.1.52

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: de06842336189852e95b075ad1453d775ba3c6772d4a65992137231184d4fbb3
4
- data.tar.gz: 39afffe676c83d5813cfa161fe9973099783198452695e84441a15caaad9cd26
3
+ metadata.gz: 52642dc28c1e253b4e66114c555044eea53f1348042f40287e3e266103ec44cd
4
+ data.tar.gz: 2e57e34a865622c0471ceddbd182889272ec7bc1c2b171cb82c4456d423e1375
5
5
  SHA512:
6
- metadata.gz: d8f6b7401acebd536537b2230222a67bb2f35ff544a5b5a6c23732176a1d221617e4ddf7eefe1f17d0a8195230722b708581b350cab33c3e2027badf4406cd30
7
- data.tar.gz: 7957577a7f52e83aca575f09300e01b78e2737db0844c72ace6d4103546386c40e967ecb2cef7d4b5f758b81cac11892b5db77f26cdf7690f75edd682e915424
6
+ metadata.gz: cae2f12158dbed0c61a72abc83d17d4e59798a917e07df66bf9899a39316febac8a0a1afbc179265124c48fef6cbcf688e6140da4a1ae775d21cf2aa65dd2fa4
7
+ data.tar.gz: 4aedf6a244a7a1628d9638b10851d3b3a4864a0841ac79d8574b18e404a1f38e1b4e584a4737e7a5bd3cd821e612264f97f2f1d95789b56b1921b51b23d3778f
@@ -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'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lhj
4
4
  module Tools
5
- VERSION = "0.1.51"
5
+ VERSION = "0.1.52"
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.51
4
+ version: 0.1.52
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-18 00:00:00.000000000 Z
11
+ date: 2022-06-22 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