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 +4 -4
- data/lib/lhj/command/sync_pod_code.rb +43 -0
- data/lib/lhj/command.rb +1 -0
- data/lib/lhj/helper/log_helper.rb +5 -0
- data/lib/lhj/helper/pgyer_helper.rb +5 -5
- data/lib/lhj/tools/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b3a7e3757035f3306fd09213009b4558445763b02c74c40b86e7016a7088ef
|
4
|
+
data.tar.gz: 86c4e51a41826d0eca77d839bdb8735471737b94452a2e82688e4ca537162721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'
|
@@ -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
|
-
|
69
|
-
|
70
|
-
|
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
|
data/lib/lhj/tools/version.rb
CHANGED
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.
|
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-
|
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
|