luna-binary-uploader 0.1.11 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2be18823676fca9bb18233b751f1d371a60534c07e54caa1a14b72fb8c040e89
4
- data.tar.gz: c81637d974e0d35cc8e9de5464618ff7198c055430b07599877c20f1b6102e00
3
+ metadata.gz: 1d529f4891c5824ed5c894073bbeec5d5668e875b54bff33d2ec84ce40279951
4
+ data.tar.gz: 298fe5853064bf24929dd43289415d4252e12e1448e08c10e665e0edc3e67870
5
5
  SHA512:
6
- metadata.gz: 350e9c4a52c80b9f4aa77e589783c10c1a0240b1c0151ca87771d0478244af4109219a247b535804453c6bbb577f157738a72f57ab7d678afbebe4ff699634c1
7
- data.tar.gz: cbcb31fa3171119886fce5a62f25643200a15ceb317e6c43e3e2d60cc009481f7ac051c86aa916369a34db4ddff30444309a855a990ea50b2bccd45dc4c53986
6
+ metadata.gz: 13a975f4a72a7b0991ae61347d75cada675ed8e9e26276a9499d55d5bbbc31c342115c924f2530c5e28900a688eeb8d107d8a5ddd595b656b52b8079a24a1c85
7
+ data.tar.gz: 23544e5512fbc4ea880afe1010c0f6fc37fae92a14a266f1e702368352cda6fb5a1bfd184ef07b71509ecc3c4958123e9f7bc8159e7eb03f372b9ad9da765038
@@ -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
- return command("lipo -create #{path2}/#{moduleName} #{path1}/#{moduleName} -output #{binary_path_merged}/#{moduleName}/#{moduleName}.framework/#{moduleName}")
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,6 +94,27 @@ 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|
@@ -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} -O -J"
44
+ command = "curl -X 'DELETE' #{CBin.config.binary_upload_url}/#{name}/#{version}"
45
45
  p command
46
46
  system command
47
47
  end
@@ -21,8 +21,8 @@ module Luna
21
21
  if pathArr != nil
22
22
  Pod::UserInterface.puts "#{pathArr.first} #{k}".yellow
23
23
  srcPath = File.dirname(pathArr.first)
24
- File.rename(srcPath, "#{rootPath}/#{k}")
25
- system "cp -r #{srcPath} #{rootPath}; "
24
+ system "cp -r #{srcPath} #{rootPath};"
25
+ File.rename("#{rootPath}/#{File.basename(srcPath)}", "#{rootPath}/#{k}")
26
26
  zipCommand = "cd #{rootPath};zip -r #{k}.zip #{k}"
27
27
  p zipCommand
28
28
  system zipCommand
@@ -50,25 +50,13 @@ module Luna
50
50
 
51
51
  def request_result_hash
52
52
  if @request_result_hash == nil
53
- command = "curl #{CBin.config.binary_upload_url}"
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
- spec_repo_binary = {}
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
@@ -104,25 +104,13 @@ module Luna
104
104
 
105
105
  def request_result_hash
106
106
  if @request_result_hash == nil
107
- command = "curl #{CBin.config.binary_upload_url}"
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
- spec_repo_binary = {}
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
@@ -1,7 +1,7 @@
1
1
  module Luna
2
2
  module Binary
3
3
  module Uploader
4
- VERSION = "0.1.11"
4
+ VERSION = "0.1.15"
5
5
  end
6
6
  end
7
7
  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.11
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - 车德超
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-20 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake