luna-binary-uploader 0.1.7 → 0.1.8

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: 2ebe782de83bb768fbbc9356e692e82792af1ebb7a8088c2cedf27a22ba89f5d
4
- data.tar.gz: 2d77f39088c3ccf4bc822974d9f8f9be3ebbc78942160eff55374812965c08cc
3
+ metadata.gz: 8eb081de584f9444708a84d7af3953965872eae7254aaa34d1744b7f635778fc
4
+ data.tar.gz: db0c4458a6b710f0fa9e5973d6b89c84d8bebebf79511df7cda1eda1eff05d08
5
5
  SHA512:
6
- metadata.gz: aeb6c70e3248365c823c4cdf14a56d8bd6aa6e8b7bb773301beb9edc23380f056ac930b8f02a24a0097796ab124c26c3f441373ab6f996e94050dd03270c44d1
7
- data.tar.gz: 02bf02c9e36369a646587b7b43a5157e86f8adee20366a23fbe2901aae82ea0fb585cbf4b070e8bfb4426ca377a76a3f861dafff754cd54e0b693b70fe398997
6
+ metadata.gz: 90ebddb758d1deaf84b6d9681fd27b3adb9027859c55e53f0aaed7020c7d171fe4ab8fdad1066f358c1fd49054e7c7ddfc63ed8c3258e7c1504e8f8c9e77d717
7
+ data.tar.gz: 5c3f759c39fbd1f09009b4002bdfb2fd2eec238b76c9e9659f0a1d25711d4bad4ee912683925ffe939c05f399e8daaf2a92538aea37fda0b8c46c8cccfb773d7
data/bin/lbu CHANGED
@@ -6,6 +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/update"
9
10
  require 'gli'
10
11
 
11
12
  # You can add fixtures and/or initialization code here to make experimenting
@@ -133,7 +134,7 @@ class App
133
134
  arg_name '参数:1.二进制路径(可以不传默认为当前目录下的/temp-luna-uploader/merged)'
134
135
  command :update do |c|
135
136
  c.action do |global_options,options,args|
136
- obj = Luna::Binary::Refresh.new()
137
+ obj = Luna::Binary::Update.new()
137
138
  if args[0] != nil
138
139
  obj.binary_path = args[0]
139
140
  else
@@ -29,26 +29,38 @@ module Luna
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
- isNext = command("xcodebuild -workspace #{workspace} -scheme #{scheme} -configuration Debug -derivedDataPath '#{Dir.pwd}/build/arm' CONFIGURATION_BUILD_DIR='#{binary_path_arm}'") if isNext == true
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 '#{Dir.pwd}/build/x86' CONFIGURATION_BUILD_DIR='#{binary_path_x86}' -destination 'platform=iOS Simulator,name=iPhone 11'") if isNext == true
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
- Pod::UserInterface.puts item.yellow
44
- armPath = findFramework(item,binary_path_arm)
45
- x86Path = findFramework(item,binary_path_x86)
46
- mergeFrameWork(item, armPath, x86Path) if armPath != nil && x86Path != nil
47
- dedupingMapper[item] = item
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 ||= begin
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
@@ -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 gitURL && tag && !moduleName["/"]
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
@@ -1,7 +1,7 @@
1
1
  module Luna
2
2
  module Binary
3
3
  module Uploader
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
6
6
  end
7
7
  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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - 车德超