luna-binary-uploader 0.1.17 → 0.1.18
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/analysis.rb +5 -5
- data/lib/luna/binary/build.rb +9 -9
- data/lib/luna/binary/delete.rb +3 -3
- data/lib/luna/binary/refresh.rb +6 -6
- data/lib/luna/binary/uploader/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15f450a18337c0c82b31cc9ecff5dab7355a1df77cadfb9af1858f354f2afaee
|
4
|
+
data.tar.gz: 293deab2e53041b1fe237a4fbcd41dd8bcf147970db3abb14769ecdfddd52b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12a3ef832a2115213a758f6fee2a74fcb2095568c8f11e6fb1ad7ee56ae798c6be1156882ad78519113f6b28e2b911ffbfe830a15da623c12e6110dd69cffb96
|
7
|
+
data.tar.gz: a172e4b94bb6996548bd2ce6c593b9f1ac2409f9db4abd9a7b37de6bade6f17ad3e14dad5744bb70bfd95b9a050bb5a7d540146862825755f99ce9bb2a9ed7d3
|
data/lib/luna/binary/analysis.rb
CHANGED
@@ -20,21 +20,21 @@ module Luna
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def validate!
|
23
|
-
arr = Dir.glob(
|
23
|
+
arr = Dir.glob(Common.instance.podFilePath)
|
24
24
|
if arr == nil
|
25
25
|
raise '当前路径下没有Podfile'
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
def lockfile
|
30
|
-
return
|
30
|
+
return Common.instance.lockfile
|
31
31
|
end
|
32
32
|
|
33
33
|
def run
|
34
34
|
failList = []
|
35
35
|
successList = []
|
36
36
|
|
37
|
-
dependenciesMapper =
|
37
|
+
dependenciesMapper = Common.instance.dependenciesMapper
|
38
38
|
dedupingMapper = {}
|
39
39
|
lockfile.pod_names.each { |item|
|
40
40
|
moduleName = item.split('/').first
|
@@ -42,7 +42,7 @@ module Luna
|
|
42
42
|
dedupingMapper[moduleName] = moduleName
|
43
43
|
puts moduleName.yellow
|
44
44
|
begin
|
45
|
-
uploader =
|
45
|
+
uploader = Common.instance.upload_lockitem(dependenciesMapper, moduleName, binary_path)
|
46
46
|
if uploader != nil
|
47
47
|
successList << uploader
|
48
48
|
else
|
@@ -133,7 +133,7 @@ module Luna
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def command(c)
|
136
|
-
return
|
136
|
+
return Common.instance.command(c)
|
137
137
|
end
|
138
138
|
|
139
139
|
end
|
data/lib/luna/binary/build.rb
CHANGED
@@ -20,7 +20,7 @@ module Luna
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def command(c)
|
23
|
-
return
|
23
|
+
return Common.instance.command(c)
|
24
24
|
end
|
25
25
|
|
26
26
|
def createFrameworks
|
@@ -29,18 +29,18 @@ module Luna
|
|
29
29
|
command("rm -rf #{Dir.pwd}/Pods")
|
30
30
|
|
31
31
|
isNext = command("pod install")
|
32
|
-
|
33
|
-
tempLunaUploaderPath =
|
32
|
+
Common.instance.deleteDirectory(binary_path_arm)
|
33
|
+
tempLunaUploaderPath = Common.instance.tempLunaUploaderPath
|
34
34
|
isNext = command("xcodebuild -workspace #{workspace} -scheme #{scheme} -configuration Debug -derivedDataPath '#{tempLunaUploaderPath}/build/arm/temp'") if isNext == true
|
35
35
|
isNext = command("cp -r #{tempLunaUploaderPath}/build/arm/temp/Build/Products/Debug-iphoneos #{binary_path_arm}") if isNext == true #本可以用CONFIGURATION_BUILD_DIR直接指定结果文件夹,结果经常性的编译报错
|
36
|
-
|
36
|
+
Common.instance.deleteDirectory(binary_path_x86)
|
37
37
|
isNext = command("xcodebuild -workspace #{workspace} -scheme #{scheme} -configuration Debug -derivedDataPath '#{tempLunaUploaderPath}/build/x86/temp' -destination 'platform=iOS Simulator,name=iPhone 11'") if isNext == true
|
38
38
|
isNext = command("cp -r #{tempLunaUploaderPath}/build/x86/temp/Build/Products/Debug-iphonesimulator #{binary_path_x86}") if isNext == true
|
39
39
|
mergeFrameWorks(binary_path_arm, binary_path_x86) if isNext == true
|
40
40
|
end
|
41
41
|
|
42
42
|
def mergeFrameWorks(binary_path_arm, binary_path_x86)
|
43
|
-
|
43
|
+
Common.instance.deleteDirectory(binary_path_merged)
|
44
44
|
dedupingMapper = {}
|
45
45
|
failList = []
|
46
46
|
p lockfile.pod_names
|
@@ -74,7 +74,7 @@ module Luna
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def lockfile
|
77
|
-
return
|
77
|
+
return Common.instance.lockfile
|
78
78
|
end
|
79
79
|
|
80
80
|
def xcodeSimulators
|
@@ -99,15 +99,15 @@ module Luna
|
|
99
99
|
|
100
100
|
|
101
101
|
def binary_path_merged
|
102
|
-
return
|
102
|
+
return Common.instance.binary_path_merged
|
103
103
|
end
|
104
104
|
|
105
105
|
def binary_path_arm
|
106
|
-
return
|
106
|
+
return Common.instance.binary_path_arm
|
107
107
|
end
|
108
108
|
|
109
109
|
def binary_path_x86
|
110
|
-
return
|
110
|
+
return Common.instance.binary_path_x86
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
data/lib/luna/binary/delete.rb
CHANGED
@@ -33,10 +33,10 @@ module Luna
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def deleteRepo
|
36
|
-
command = "cd #{
|
36
|
+
command = "cd #{Common.instance.repoPath}; git stash;git checkout master;git pull origin master;"
|
37
37
|
system command
|
38
|
-
|
39
|
-
commandADD = "cd #{
|
38
|
+
Common.instance.deleteDirectory("#{Common.instance.repoPath}/#{name}/#{version}")
|
39
|
+
commandADD = "cd #{Common.instance.repoPath};git add .; git commit -m 'DEL::#{name}-#{version} by LBU'; git push -f origin master"
|
40
40
|
system commandADD
|
41
41
|
end
|
42
42
|
|
data/lib/luna/binary/refresh.rb
CHANGED
@@ -9,8 +9,8 @@ module Luna
|
|
9
9
|
attr_accessor :request_result_hash
|
10
10
|
|
11
11
|
def run
|
12
|
-
spec_repo_binary =
|
13
|
-
dependencies_mapper =
|
12
|
+
spec_repo_binary = Common.instance.createNeedFrameworkMapper
|
13
|
+
dependencies_mapper = Common.instance.dependenciesMapper
|
14
14
|
failList = []
|
15
15
|
successList = []
|
16
16
|
spec_repo_binary.each { |k,v|
|
@@ -18,9 +18,9 @@ module Luna
|
|
18
18
|
begin
|
19
19
|
puts "#{k} #{v}".yellow
|
20
20
|
|
21
|
-
uploader =
|
21
|
+
uploader = Common.instance.upload_lockitem(dependencies_mapper,k ,binary_path, true)
|
22
22
|
if uploader != nil
|
23
|
-
|
23
|
+
Delete.new(k,v).delete
|
24
24
|
puts "#{k} #{v} 重新制作上传".yellow
|
25
25
|
uploader.upload
|
26
26
|
successList << "#{k} #{v}"
|
@@ -57,12 +57,12 @@ module Luna
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def lockfile
|
60
|
-
return
|
60
|
+
return Common.instance.lockfile
|
61
61
|
end
|
62
62
|
|
63
63
|
def request_result_hash
|
64
64
|
if @request_result_hash == nil
|
65
|
-
@request_result_hash =
|
65
|
+
@request_result_hash = Common.instance.request_result_hash
|
66
66
|
end
|
67
67
|
return @request_result_hash
|
68
68
|
end
|