luna-binary-uploader 0.1.2 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/bin/lbu +2 -2
- data/lib/luna/binary/build.rb +21 -9
- data/lib/luna/binary/common/common.rb +1 -14
- data/lib/luna/binary/update.rb +11 -1
- data/lib/luna/binary/uploader/version.rb +1 -1
- data/luna-binary-uploader.gemspec +5 -6
- metadata +1 -2
- data/Gemfile.lock +0 -174
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8eb081de584f9444708a84d7af3953965872eae7254aaa34d1744b7f635778fc
|
4
|
+
data.tar.gz: db0c4458a6b710f0fa9e5973d6b89c84d8bebebf79511df7cda1eda1eff05d08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90ebddb758d1deaf84b6d9681fd27b3adb9027859c55e53f0aaed7020c7d171fe4ab8fdad1066f358c1fd49054e7c7ddfc63ed8c3258e7c1504e8f8c9e77d717
|
7
|
+
data.tar.gz: 5c3f759c39fbd1f09009b4002bdfb2fd2eec238b76c9e9659f0a1d25711d4bad4ee912683925ffe939c05f399e8daaf2a92538aea37fda0b8c46c8cccfb773d7
|
data/.gitignore
CHANGED
data/bin/lbu
CHANGED
@@ -6,7 +6,7 @@ require "luna/binary/delete"
|
|
6
6
|
require "luna/binary/analysis"
|
7
7
|
require "luna/binary/refresh"
|
8
8
|
require "luna/binary/build"
|
9
|
-
require "luna/binary/
|
9
|
+
require "luna/binary/update"
|
10
10
|
require 'gli'
|
11
11
|
|
12
12
|
# You can add fixtures and/or initialization code here to make experimenting
|
@@ -134,7 +134,7 @@ class App
|
|
134
134
|
arg_name '参数:1.二进制路径(可以不传默认为当前目录下的/temp-luna-uploader/merged)'
|
135
135
|
command :update do |c|
|
136
136
|
c.action do |global_options,options,args|
|
137
|
-
obj = Luna::Binary::
|
137
|
+
obj = Luna::Binary::Update.new()
|
138
138
|
if args[0] != nil
|
139
139
|
obj.binary_path = args[0]
|
140
140
|
else
|
data/lib/luna/binary/build.rb
CHANGED
@@ -26,29 +26,41 @@ module Luna
|
|
26
26
|
def createFrameworks
|
27
27
|
isNext = true
|
28
28
|
Pod::UserInterface.puts "请将二进制开关关闭,确保每个模块都是源码运行,因为二进制的因素有可能source缓存还是会引入二进制".yellow
|
29
|
-
|
29
|
+
command("rm -rf #{Dir.pwd}/Pods")
|
30
30
|
isNext = command("pod install")
|
31
31
|
Luna::Binary::Common.instance.deleteDirectory(binary_path_arm)
|
32
|
-
|
32
|
+
tempLunaUploaderPath = Luna::Binary::Common.instance.tempLunaUploaderPath
|
33
|
+
isNext = command("xcodebuild -workspace #{workspace} -scheme #{scheme} -configuration Debug -derivedDataPath '#{tempLunaUploaderPath}/build/arm/temp'") if isNext == true
|
34
|
+
isNext = command("cp -r #{tempLunaUploaderPath}/build/arm/temp/Build/Products #{binary_path_arm}") if isNext == true #本可以用CONFIGURATION_BUILD_DIR直接指定结果文件夹,结果经常性的编译报错
|
33
35
|
Luna::Binary::Common.instance.deleteDirectory(binary_path_x86)
|
34
|
-
isNext = command("xcodebuild -workspace #{workspace} -scheme #{scheme} -configuration Debug -derivedDataPath '#{
|
36
|
+
isNext = command("xcodebuild -workspace #{workspace} -scheme #{scheme} -configuration Debug -derivedDataPath '#{tempLunaUploaderPath}/build/x86/temp' -destination 'platform=iOS Simulator,name=iPhone 11'") if isNext == true
|
37
|
+
isNext = command("cp -r #{tempLunaUploaderPath}/build/x86/temp/Build/Products #{binary_path_x86}") if isNext == true
|
35
38
|
mergeFrameWorks(binary_path_arm, binary_path_x86) if isNext == true
|
36
39
|
end
|
37
40
|
|
38
41
|
def mergeFrameWorks(binary_path_arm, binary_path_x86)
|
39
42
|
Luna::Binary::Common.instance.deleteDirectory(binary_path_merged)
|
40
43
|
dedupingMapper = {}
|
44
|
+
failList = []
|
41
45
|
lockfile.pod_names.each { |item|
|
42
46
|
if item["/"] == nil && dedupingMapper[item] == nil
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
47
|
+
begin
|
48
|
+
Pod::UserInterface.puts item.yellow
|
49
|
+
armPath = findFramework(item,binary_path_arm)
|
50
|
+
x86Path = findFramework(item,binary_path_x86)
|
51
|
+
mergeFrameWork(item, armPath, x86Path) if armPath != nil && x86Path != nil
|
52
|
+
dedupingMapper[item] = item
|
53
|
+
rescue => exception
|
54
|
+
failList << "#{item} exception : #{exception}"
|
55
|
+
ensure
|
56
|
+
|
57
|
+
end
|
58
|
+
|
48
59
|
end
|
49
60
|
}
|
50
61
|
|
51
62
|
Pod::UserInterface.puts "合并后的framework的路径为:#{binary_path_merged}".yellow
|
63
|
+
Pod::UserInterface.puts "失败的名单为:#{failList}".yellow
|
52
64
|
end
|
53
65
|
|
54
66
|
def lockfile
|
@@ -66,7 +78,7 @@ module Luna
|
|
66
78
|
end
|
67
79
|
|
68
80
|
def findFramework(moduleName, binary_path)
|
69
|
-
pathArr = Dir.glob("#{binary_path}/**/#{moduleName}.framework")
|
81
|
+
pathArr = Dir.glob("#{binary_path}/**/#{moduleName.sub('-', '_')}.framework")
|
70
82
|
if pathArr != nil
|
71
83
|
return pathArr.first
|
72
84
|
else
|
@@ -90,8 +90,7 @@ module Luna
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def lockfile
|
93
|
-
@lockfile ||=
|
94
|
-
Pod::Lockfile.from_file(podFilePath) if podFilePath.exist?
|
93
|
+
@lockfile ||= Pod::Lockfile.from_file(podFilePath) if podFilePath.exist?
|
95
94
|
end
|
96
95
|
|
97
96
|
def use_framework_list
|
@@ -108,18 +107,6 @@ module Luna
|
|
108
107
|
end
|
109
108
|
return list
|
110
109
|
end
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
end
|
117
|
-
|
118
|
-
# def pushInRepo(name, version)
|
119
|
-
|
120
|
-
|
121
|
-
# end
|
122
|
-
|
123
110
|
end
|
124
111
|
end
|
125
112
|
end
|
data/lib/luna/binary/update.rb
CHANGED
@@ -14,6 +14,7 @@ module Luna
|
|
14
14
|
Luna::Binary::Common.instance.deleteDirectory("#{rootPath}")
|
15
15
|
system "mkdir -p #{rootPath};"
|
16
16
|
failList = []
|
17
|
+
successList = []
|
17
18
|
dependenciesMapper = lockfile.dependencies.map { |item| [item.name, item]}.to_h
|
18
19
|
spec_repo_binary.each { |k,v|
|
19
20
|
if request_result_hash[k] == nil || request_result_hash[k].include?(v) == false
|
@@ -34,7 +35,16 @@ module Luna
|
|
34
35
|
tag = lockItem.external_source['tag'.parameterize.underscore.to_sym]
|
35
36
|
path = lockItem.external_source['path'.parameterize.underscore.to_sym]
|
36
37
|
p "#{moduleName} git: #{gitURL} tag: #{tag} path: #{path}"
|
37
|
-
if
|
38
|
+
if path
|
39
|
+
pathArr = Dir.glob("#{Dir.pwd}/#{path}/**/#{moduleName}.podspec")
|
40
|
+
if pathArr
|
41
|
+
uploader = Luna::Binary::Uploader::SingleUploader.new(moduleName, "", "", binary_path)
|
42
|
+
uploader.specification=Pod::Specification.from_file(pathArr.first)
|
43
|
+
uploader.specificationWork
|
44
|
+
localPathMapper[moduleName] = pathArr.first
|
45
|
+
end
|
46
|
+
|
47
|
+
elsif gitURL && tag && !moduleName["/"]
|
38
48
|
uploader = Luna::Binary::Uploader::SingleUploader.new(moduleName, gitURL, tag, binary_path)
|
39
49
|
uploader.specificationWork
|
40
50
|
successList << uploader
|
@@ -19,11 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
# Specify which files should be added to the gem when it is released.
|
21
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
# ")
|
22
|
+
# spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
23
|
+
# `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
+
# end
|
25
|
+
spec.files = `git ls-files`.split("\n")
|
27
26
|
|
28
27
|
spec.bindir = "bin"
|
29
28
|
spec.executables << 'lbu'
|
@@ -35,5 +34,5 @@ Gem::Specification.new do |spec|
|
|
35
34
|
spec.add_dependency 'cocoapods-imy-bin','0.3.1.3'
|
36
35
|
spec.add_dependency "cocoapods-generate",'~>2.0.1'
|
37
36
|
spec.add_runtime_dependency('gli','2.19.0')
|
38
|
-
spec.require_paths =
|
37
|
+
spec.require_paths = "lib"
|
39
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 车德超
|
@@ -133,7 +133,6 @@ files:
|
|
133
133
|
- ".gitignore"
|
134
134
|
- CODE_OF_CONDUCT.md
|
135
135
|
- Gemfile
|
136
|
-
- Gemfile.lock
|
137
136
|
- LICENSE.txt
|
138
137
|
- README.md
|
139
138
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,174 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
luna-binary-uploader (0.1.22)
|
5
|
-
cocoapods
|
6
|
-
cocoapods-generate (~> 2.0.1)
|
7
|
-
cocoapods-imy-bin (= 0.3.1.3)
|
8
|
-
gli (= 2.19.0)
|
9
|
-
parallel
|
10
|
-
|
11
|
-
GEM
|
12
|
-
remote: https://rubygems.org/
|
13
|
-
specs:
|
14
|
-
CFPropertyList (3.0.4)
|
15
|
-
rexml
|
16
|
-
activesupport (6.1.4.1)
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (>= 1.6, < 2)
|
19
|
-
minitest (>= 5.1)
|
20
|
-
tzinfo (~> 2.0)
|
21
|
-
zeitwerk (~> 2.3)
|
22
|
-
addressable (2.8.0)
|
23
|
-
public_suffix (>= 2.0.2, < 5.0)
|
24
|
-
algoliasearch (1.27.5)
|
25
|
-
httpclient (~> 2.8, >= 2.8.3)
|
26
|
-
json (>= 1.5.1)
|
27
|
-
aruba (2.0.0)
|
28
|
-
bundler (>= 1.17, < 3.0)
|
29
|
-
childprocess (>= 2.0, < 5.0)
|
30
|
-
contracts (>= 0.16.0, < 0.18.0)
|
31
|
-
cucumber (>= 4.0, < 8.0)
|
32
|
-
rspec-expectations (~> 3.4)
|
33
|
-
thor (~> 1.0)
|
34
|
-
atomos (0.1.3)
|
35
|
-
builder (3.2.4)
|
36
|
-
childprocess (4.1.0)
|
37
|
-
claide (1.0.3)
|
38
|
-
cocoapods (1.11.2)
|
39
|
-
addressable (~> 2.8)
|
40
|
-
claide (>= 1.0.2, < 2.0)
|
41
|
-
cocoapods-core (= 1.11.2)
|
42
|
-
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
43
|
-
cocoapods-downloader (>= 1.4.0, < 2.0)
|
44
|
-
cocoapods-plugins (>= 1.0.0, < 2.0)
|
45
|
-
cocoapods-search (>= 1.0.0, < 2.0)
|
46
|
-
cocoapods-trunk (>= 1.4.0, < 2.0)
|
47
|
-
cocoapods-try (>= 1.1.0, < 2.0)
|
48
|
-
colored2 (~> 3.1)
|
49
|
-
escape (~> 0.0.4)
|
50
|
-
fourflusher (>= 2.3.0, < 3.0)
|
51
|
-
gh_inspector (~> 1.0)
|
52
|
-
molinillo (~> 0.8.0)
|
53
|
-
nap (~> 1.0)
|
54
|
-
ruby-macho (>= 1.0, < 3.0)
|
55
|
-
xcodeproj (>= 1.21.0, < 2.0)
|
56
|
-
cocoapods-core (1.11.2)
|
57
|
-
activesupport (>= 5.0, < 7)
|
58
|
-
addressable (~> 2.8)
|
59
|
-
algoliasearch (~> 1.0)
|
60
|
-
concurrent-ruby (~> 1.1)
|
61
|
-
fuzzy_match (~> 2.0.4)
|
62
|
-
nap (~> 1.0)
|
63
|
-
netrc (~> 0.11)
|
64
|
-
public_suffix (~> 4.0)
|
65
|
-
typhoeus (~> 1.0)
|
66
|
-
cocoapods-deintegrate (1.0.5)
|
67
|
-
cocoapods-disable-podfile-validations (0.1.1)
|
68
|
-
cocoapods-downloader (1.5.1)
|
69
|
-
cocoapods-generate (2.0.1)
|
70
|
-
cocoapods-disable-podfile-validations (~> 0.1.1)
|
71
|
-
cocoapods-imy-bin (0.3.1.3)
|
72
|
-
cocoapods
|
73
|
-
cocoapods-generate (~> 2.0.0)
|
74
|
-
parallel
|
75
|
-
cocoapods-plugins (1.0.0)
|
76
|
-
nap
|
77
|
-
cocoapods-search (1.0.1)
|
78
|
-
cocoapods-trunk (1.6.0)
|
79
|
-
nap (>= 0.8, < 2.0)
|
80
|
-
netrc (~> 0.11)
|
81
|
-
cocoapods-try (1.2.0)
|
82
|
-
colored2 (3.1.2)
|
83
|
-
concurrent-ruby (1.1.9)
|
84
|
-
contracts (0.16.1)
|
85
|
-
cucumber (7.0.0)
|
86
|
-
builder (~> 3.2, >= 3.2.4)
|
87
|
-
cucumber-core (~> 10.0, >= 10.0.1)
|
88
|
-
cucumber-create-meta (~> 6.0, >= 6.0.1)
|
89
|
-
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
90
|
-
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
91
|
-
cucumber-html-formatter (~> 16.0, >= 16.0.1)
|
92
|
-
cucumber-messages (~> 17.0, >= 17.0.1)
|
93
|
-
cucumber-wire (~> 6.0, >= 6.0.1)
|
94
|
-
diff-lcs (~> 1.4, >= 1.4.4)
|
95
|
-
mime-types (~> 3.3, >= 3.3.1)
|
96
|
-
multi_test (~> 0.1, >= 0.1.2)
|
97
|
-
sys-uname (~> 1.2, >= 1.2.2)
|
98
|
-
cucumber-core (10.0.1)
|
99
|
-
cucumber-gherkin (~> 20.0, >= 20.0.1)
|
100
|
-
cucumber-messages (~> 17.0, >= 17.0.1)
|
101
|
-
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
102
|
-
cucumber-create-meta (6.0.1)
|
103
|
-
cucumber-messages (~> 17.0, >= 17.0.1)
|
104
|
-
sys-uname (~> 1.2, >= 1.2.2)
|
105
|
-
cucumber-cucumber-expressions (12.1.3)
|
106
|
-
cucumber-gherkin (20.0.1)
|
107
|
-
cucumber-messages (~> 17.0, >= 17.0.1)
|
108
|
-
cucumber-html-formatter (16.0.1)
|
109
|
-
cucumber-messages (~> 17.0, >= 17.0.1)
|
110
|
-
cucumber-messages (17.1.1)
|
111
|
-
cucumber-tag-expressions (3.0.1)
|
112
|
-
cucumber-wire (6.1.1)
|
113
|
-
cucumber-core (~> 10.0, >= 10.0.1)
|
114
|
-
cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
|
115
|
-
cucumber-messages (~> 17.0, >= 17.0.1)
|
116
|
-
diff-lcs (1.4.4)
|
117
|
-
escape (0.0.4)
|
118
|
-
ethon (0.14.0)
|
119
|
-
ffi (>= 1.15.0)
|
120
|
-
ffi (1.15.4)
|
121
|
-
fourflusher (2.3.1)
|
122
|
-
fuzzy_match (2.0.4)
|
123
|
-
gh_inspector (1.1.3)
|
124
|
-
gli (2.19.0)
|
125
|
-
httpclient (2.8.3)
|
126
|
-
i18n (1.8.10)
|
127
|
-
concurrent-ruby (~> 1.0)
|
128
|
-
json (2.5.1)
|
129
|
-
mime-types (3.3.1)
|
130
|
-
mime-types-data (~> 3.2015)
|
131
|
-
mime-types-data (3.2021.0901)
|
132
|
-
minitest (5.14.4)
|
133
|
-
molinillo (0.8.0)
|
134
|
-
multi_test (0.1.2)
|
135
|
-
nanaimo (0.3.0)
|
136
|
-
nap (1.1.0)
|
137
|
-
netrc (0.11.0)
|
138
|
-
parallel (1.21.0)
|
139
|
-
public_suffix (4.0.6)
|
140
|
-
rake (12.3.3)
|
141
|
-
rdoc (6.3.2)
|
142
|
-
rexml (3.2.5)
|
143
|
-
rspec-expectations (3.10.1)
|
144
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
145
|
-
rspec-support (~> 3.10.0)
|
146
|
-
rspec-support (3.10.2)
|
147
|
-
ruby-macho (2.5.1)
|
148
|
-
sys-uname (1.2.2)
|
149
|
-
ffi (~> 1.1)
|
150
|
-
thor (1.1.0)
|
151
|
-
typhoeus (1.4.0)
|
152
|
-
ethon (>= 0.9.0)
|
153
|
-
tzinfo (2.0.4)
|
154
|
-
concurrent-ruby (~> 1.0)
|
155
|
-
xcodeproj (1.21.0)
|
156
|
-
CFPropertyList (>= 2.3.3, < 4.0)
|
157
|
-
atomos (~> 0.1.3)
|
158
|
-
claide (>= 1.0.2, < 2.0)
|
159
|
-
colored2 (~> 3.1)
|
160
|
-
nanaimo (~> 0.3.0)
|
161
|
-
rexml (~> 3.2.4)
|
162
|
-
zeitwerk (2.4.2)
|
163
|
-
|
164
|
-
PLATFORMS
|
165
|
-
ruby
|
166
|
-
|
167
|
-
DEPENDENCIES
|
168
|
-
aruba
|
169
|
-
luna-binary-uploader!
|
170
|
-
rake (~> 12.0)
|
171
|
-
rdoc
|
172
|
-
|
173
|
-
BUNDLED WITH
|
174
|
-
2.1.4
|