luna-binary-uploader 0.1.12 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/luna/binary/build.rb +3 -1
- data/lib/luna/binary/common/common.rb +24 -2
- data/lib/luna/binary/delete.rb +1 -1
- data/lib/luna/binary/refresh.rb +6 -18
- data/lib/luna/binary/update.rb +2 -14
- data/lib/luna/binary/uploader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eabb8cf60ac1ae91b7f1bcdf005fd59b885ee60627307c4aa3ac0f6150c759b3
|
4
|
+
data.tar.gz: 04d6b4672865935bcc3d204e4b4657e6351ceaca39687f58909580fb45aeb179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0422488449593c2e144358cf2c98a116af7800675c8e6c97667120bca995a7eeaf9b3421f3fc5c1efa17c28efa82e733f66995ea397eee146da64d3f9de1bbb3'
|
7
|
+
data.tar.gz: 201e7660cfacc4d82ba60fb7d561de626e3841787ef5f122bce557a435213dd25ece50059d168e0cb98f9ab375f334b358b42ce58ea835416d0f662b5857856c
|
data/lib/luna/binary/build.rb
CHANGED
@@ -27,6 +27,7 @@ module Luna
|
|
27
27
|
isNext = true
|
28
28
|
Pod::UserInterface.puts "请将二进制开关关闭,确保每个模块都是源码运行,因为二进制的因素有可能source缓存还是会引入二进制".yellow
|
29
29
|
command("rm -rf #{Dir.pwd}/Pods")
|
30
|
+
|
30
31
|
isNext = command("pod install")
|
31
32
|
Luna::Binary::Common.instance.deleteDirectory(binary_path_arm)
|
32
33
|
tempLunaUploaderPath = Luna::Binary::Common.instance.tempLunaUploaderPath
|
@@ -74,7 +75,8 @@ module Luna
|
|
74
75
|
|
75
76
|
def mergeFrameWork(moduleName, path1, path2)
|
76
77
|
command("mkdir -p #{binary_path_merged}; cp -r #{File.dirname(path1)} #{binary_path_merged}; mv #{binary_path_merged}/#{File.basename(File.dirname(path1))} #{binary_path_merged}/#{moduleName};")
|
77
|
-
|
78
|
+
command("lipo -create #{path2}/#{moduleName} #{path1}/#{moduleName} -output #{binary_path_merged}/#{moduleName}/#{moduleName}.framework/#{moduleName}")
|
79
|
+
command("cp -r #{path2}/Modules/#{moduleName}.swiftmodule #{binary_path_merged}/#{moduleName}/#{moduleName}.framework/Modules")
|
78
80
|
end
|
79
81
|
|
80
82
|
def findFramework(moduleName, binary_path)
|
@@ -94,18 +94,40 @@ module Luna
|
|
94
94
|
@lockfile ||= Pod::Lockfile.from_file(podFilePath) if podFilePath.exist?
|
95
95
|
end
|
96
96
|
|
97
|
+
def request_result_hash
|
98
|
+
command = "curl #{CBin.config.binary_upload_url}"
|
99
|
+
p command
|
100
|
+
result = %x(#{command})
|
101
|
+
request_result_hash = JSON.parse(result)
|
102
|
+
p request_result_hash
|
103
|
+
return request_result_hash
|
104
|
+
end
|
105
|
+
|
106
|
+
def createNeedFrameworkMapper
|
107
|
+
spec_repo_binary = {}
|
108
|
+
Pod::UserInterface.puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
|
109
|
+
Luna::Binary::Common.instance.use_framework_list.each { |item|
|
110
|
+
name = item.split('/').first
|
111
|
+
if spec_repo_binary[name] == nil
|
112
|
+
spec_repo_binary[name] = lockfile.version(name).version
|
113
|
+
end
|
114
|
+
}
|
115
|
+
return spec_repo_binary
|
116
|
+
end
|
117
|
+
|
97
118
|
def use_framework_list
|
98
119
|
list = []
|
99
120
|
File.open(Dir.pwd+"/Podfile", 'r:utf-8') do |f|
|
100
121
|
f.each_line do |item|
|
101
122
|
if item[":dev_env_use_binary"]
|
102
|
-
matchs = item.match(
|
123
|
+
matchs = item.match(/\'(?<=').*?(?=')\'/)
|
103
124
|
if matchs != nil
|
104
|
-
list << matchs[
|
125
|
+
list << matchs[0].gsub("'", "")
|
105
126
|
end
|
106
127
|
end
|
107
128
|
end
|
108
129
|
end
|
130
|
+
p "use_framework_list: #{list}"
|
109
131
|
return list
|
110
132
|
end
|
111
133
|
end
|
data/lib/luna/binary/delete.rb
CHANGED
@@ -41,7 +41,7 @@ module Luna
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def deleteBinaryFramework
|
44
|
-
command = "curl -X 'DELETE' #{CBin.config.binary_upload_url}/#{name}/#{version}
|
44
|
+
command = "curl -X 'DELETE' #{CBin.config.binary_upload_url}/#{name}/#{version}"
|
45
45
|
p command
|
46
46
|
system command
|
47
47
|
end
|
data/lib/luna/binary/refresh.rb
CHANGED
@@ -26,10 +26,10 @@ module Luna
|
|
26
26
|
zipCommand = "cd #{rootPath};zip -r #{k}.zip #{k}"
|
27
27
|
p zipCommand
|
28
28
|
system zipCommand
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
Luna::Binary::Delete.new(k,v).deleteBinaryFramework
|
30
|
+
command = "cd #{rootPath};curl #{CBin.config.binary_upload_url} -F \"name=#{k}\" -F \"version=#{v}\" -F \"annotate=#{k}_#{v}_log\" -F \"file=@#{k}.zip\""
|
31
|
+
p command
|
32
|
+
system command
|
33
33
|
end
|
34
34
|
rescue => exception
|
35
35
|
p exception
|
@@ -50,25 +50,13 @@ module Luna
|
|
50
50
|
|
51
51
|
def request_result_hash
|
52
52
|
if @request_result_hash == nil
|
53
|
-
|
54
|
-
p command
|
55
|
-
result = %x(#{command})
|
56
|
-
@request_result_hash = JSON.parse(result)
|
57
|
-
p @request_result_hash
|
53
|
+
@request_result_hash = Luna::Binary::Common.instance.request_result_hash
|
58
54
|
end
|
59
55
|
return @request_result_hash
|
60
56
|
end
|
61
57
|
|
62
58
|
def createNeedFrameworkMapper
|
63
|
-
|
64
|
-
Pod::UserInterface.puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
|
65
|
-
Luna::Binary::Common.instance.use_framework_list.each { |item|
|
66
|
-
if spec_repo_binary[item] == nil && item["/"] == nil
|
67
|
-
name = item.split('/').first
|
68
|
-
spec_repo_binary[name] = lockfile.version(name).version
|
69
|
-
end
|
70
|
-
}
|
71
|
-
return spec_repo_binary
|
59
|
+
return Luna::Binary::Common.instance.createNeedFrameworkMapper
|
72
60
|
end
|
73
61
|
end
|
74
62
|
end
|
data/lib/luna/binary/update.rb
CHANGED
@@ -104,25 +104,13 @@ module Luna
|
|
104
104
|
|
105
105
|
def request_result_hash
|
106
106
|
if @request_result_hash == nil
|
107
|
-
|
108
|
-
p command
|
109
|
-
result = %x(#{command})
|
110
|
-
@request_result_hash = JSON.parse(result)
|
111
|
-
p @request_result_hash
|
107
|
+
@request_result_hash = Luna::Binary::Common.instance.request_result_hash
|
112
108
|
end
|
113
109
|
return @request_result_hash
|
114
110
|
end
|
115
111
|
|
116
112
|
def createNeedFrameworkMapper
|
117
|
-
|
118
|
-
Pod::UserInterface.puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
|
119
|
-
Luna::Binary::Common.instance.use_framework_list.each { |item|
|
120
|
-
if spec_repo_binary[item] == nil && item["/"] == nil
|
121
|
-
name = item.split('/').first
|
122
|
-
spec_repo_binary[name] = lockfile.version(name).version
|
123
|
-
end
|
124
|
-
}
|
125
|
-
return spec_repo_binary
|
113
|
+
return Luna::Binary::Common.instance.createNeedFrameworkMapper
|
126
114
|
end
|
127
115
|
end
|
128
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luna-binary-uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 车德超
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|