luna-binary-uploader 0.1.19 → 0.1.20

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: d54b08da3ecda037f4a5f1aa25e67c35acbafe5cce340f63dc5f6bd0cda7fba9
4
- data.tar.gz: be02803fced8ac0fd75cb06f00df2a87be32e3e7ad707b4f32f1c6ee24995091
3
+ metadata.gz: 4ef5b62bf685747e70e13f3ea5480f37cb303dfe1b37cb66690baa8beee4ec3e
4
+ data.tar.gz: 9366ecb00ae20f321afce1b2ccc319793be0f4291c7e4ba4d900f0ad983f5f80
5
5
  SHA512:
6
- metadata.gz: 80dc36ef3a07ce52fcdc8e3ced23694281d2decd69d7d32a352922595a54c3101997eca0de3c0d56de0a4306ffa6b97ae69a921da0be605c2893b47fb53e461d
7
- data.tar.gz: 4c3360583f7a317f6fdda7b143ed57b78d584ff18e7815153579add4ba443b79c08cae8601af1bb5500c84c9204039c94023fe85ebdd25b6f7d85b87d769cad7
6
+ metadata.gz: 253788b801070db954121214fb1c9f1cbf4363350dfd2861716d8aeb68ff29f1fcffe1910b86b5ecd29f5b53d6966ab7b6db7481f837379a15d5d06f1b5af9ca
7
+ data.tar.gz: 2d6038f930cb1ded0bc343f7d747a913fd7a7d3d1e6c21b4b11808c118a5311bb7b41163f1c8f91fdd9a3be47f1afd6af13be78bbdd0ea43212bd175a2170039
data/bin/lbu CHANGED
@@ -1,14 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "luna/binary/uploader"
5
- require "luna/binary/delete"
6
- require "luna/binary/analysis"
7
- require "luna/binary/refresh"
8
- require "luna/binary/build"
9
- require "luna/binary/update"
10
- require "luna/binary/install"
11
- require "luna/binary/init"
4
+ require "luna-binary-uploader"
12
5
  require 'gli'
13
6
 
14
7
  # You can add fixtures and/or initialization code here to make experimenting
@@ -188,6 +181,7 @@ class App
188
181
  obj.run
189
182
  else
190
183
  raise "缺少参数:1.xcworkspace 名称 eg:MyWorkSpace.xcworkspace 2.scheme eg: MyProject"
184
+ end
191
185
  end
192
186
  end
193
187
 
@@ -14,7 +14,12 @@ module Luna
14
14
  attr_accessor :version, :state
15
15
  attr_accessor :podFilePath
16
16
  attr_accessor :lockfile
17
-
17
+ attr_reader :bin_dev
18
+ attr_reader :binary_repo_url
19
+ attr_reader :binary_upload_url
20
+ attr_reader :binary_download_url
21
+ attr_reader :download_file_type
22
+
18
23
  def initialize()
19
24
  end
20
25
 
@@ -22,7 +27,7 @@ module Luna
22
27
  sources = Pod::Config.instance.sources_manager.all
23
28
  repoPath = nil
24
29
  sources.each { |item|
25
- if item.url == CBin.config.binary_repo_url
30
+ if item.url == Common.instance.binary_repo_url
26
31
  repoPath = item.repo
27
32
  end
28
33
  }
@@ -95,7 +100,7 @@ module Luna
95
100
  end
96
101
 
97
102
  def request_result_hash
98
- command = "curl #{CBin.config.binary_upload_url}"
103
+ command = "curl #{Common.instance.binary_upload_url}"
99
104
  p command
100
105
  result = %x(#{command})
101
106
  request_result_hash = JSON.parse(result)
@@ -105,7 +110,7 @@ module Luna
105
110
 
106
111
  def createNeedFrameworkMapper
107
112
  spec_repo_binary = {}
108
- puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
113
+ puts "二进制repo地址 : #{Common.instance.binary_repo_url}".yellow
109
114
  use_framework_list.each { |item|
110
115
  name = item.split('/').first
111
116
  if spec_repo_binary[name] == nil
@@ -214,6 +219,42 @@ module Luna
214
219
  return lockfile.dependencies.map { |item| [item.name.split("/").first, item]}.to_h
215
220
  end
216
221
 
222
+ def bin_dev
223
+ if @bin_dev == nil
224
+ @bin_dev = YAML.load_file("#{Pod::Config.instance.home_dir}/bin_dev.yml")
225
+ end
226
+ return @bin_dev
227
+ end
228
+
229
+ def binary_repo_url
230
+ if @binary_repo_url == nil
231
+ @binary_repo_url = bin_dev["binary_repo_url"]
232
+ end
233
+ return @binary_repo_url
234
+ end
235
+
236
+ def binary_upload_url
237
+ if @binary_upload_url == nil
238
+ cut_string = "/%s/%s/zip"
239
+ @binary_upload_url = binary_download_url[0,binary_download_url.length - cut_string.length]
240
+ end
241
+ return @binary_upload_url
242
+ end
243
+
244
+ def binary_download_url
245
+ if @binary_download_url == nil
246
+ @binary_download_url = bin_dev["binary_download_url"]
247
+ end
248
+ return @binary_download_url
249
+ end
250
+
251
+ def download_file_type
252
+ if @download_file_type == nil
253
+ @download_file_type = bin_dev["download_file_type"]
254
+ end
255
+ return @download_file_type
256
+ end
257
+
217
258
  end
218
259
  end
219
260
  end
@@ -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' #{Common.instance.binary_upload_url}/#{name}/#{version}"
45
45
  p command
46
46
  system command
47
47
  end
@@ -17,7 +17,7 @@ module Luna
17
17
 
18
18
  def run
19
19
  Common.instance.command("curl -o #{Pod::Config.instance.home_dir}/bin_dev.yml #{url}")
20
- Common.instance.command("pod repo add z-ios-framework-spec-repo #{CBin.config.binary_repo_url}")
20
+ Common.instance.command("pod repo add z-ios-framework-spec-repo #{Common.instance.binary_repo_url}")
21
21
  end
22
22
 
23
23
  end
@@ -1,7 +1,7 @@
1
1
  module Luna
2
2
  module Binary
3
3
  module Uploader
4
- VERSION = "0.1.19"
4
+ VERSION = "0.1.20"
5
5
  end
6
6
  end
7
7
  end
@@ -322,7 +322,7 @@ module Luna
322
322
  end
323
323
 
324
324
  def binary_source
325
- { http: format(CBin.config.binary_download_url, specification.root.name, specification.version), type: CBin.config.download_file_type }
325
+ { http: format(Common.instance.binary_download_url, specification.root.name, specification.version), type: Common.instance.download_file_type }
326
326
  end
327
327
 
328
328
  def source_files(suffix)
@@ -385,7 +385,7 @@ module Luna
385
385
  end
386
386
 
387
387
  def isHasFrameworkInService
388
- command = "curl #{format(CBin.config.binary_download_url, specification.root.name, specification.version).sub("#{CBin.config.download_file_type}","")}"
388
+ command = "curl #{format(Common.instance.binary_download_url, specification.root.name, specification.version).sub("#{Common.instance.download_file_type}","")}"
389
389
  p command
390
390
  result = %x(#{command})
391
391
  resultHash = JSON.parse(result)
@@ -405,7 +405,7 @@ module Luna
405
405
  zipCommand = "cd #{rootName};zip -r #{specification.root.name}.zip #{specification.root.name}"
406
406
  p zipCommand
407
407
  system zipCommand
408
- command = "cd #{rootName};curl #{CBin.config.binary_upload_url} -F \"name=#{specification.root.name}\" -F \"version=#{specification.version}\" -F \"annotate=#{specification.root.name}_#{specification.version}_log\" -F \"file=@#{specification.root.name}.zip\""
408
+ command = "cd #{rootName};curl #{Common.instance.binary_upload_url} -F \"name=#{specification.root.name}\" -F \"version=#{specification.version}\" -F \"annotate=#{specification.root.name}_#{specification.version}_log\" -F \"file=@#{specification.root.name}.zip\""
409
409
  p command
410
410
  system command
411
411
  end
@@ -0,0 +1,9 @@
1
+ require "luna/binary/uploader"
2
+ require "luna/binary/delete"
3
+ require "luna/binary/analysis"
4
+ require "luna/binary/refresh"
5
+ require "luna/binary/build"
6
+ require "luna/binary/update"
7
+ require "luna/binary/install"
8
+ require "luna/binary/init"
9
+ require "luna/binary/common/common"
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.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - 车德超
@@ -139,6 +139,7 @@ files:
139
139
  - Rakefile
140
140
  - bin/lbu
141
141
  - bin/setup
142
+ - lib/luna-binary-uploader.rb
142
143
  - lib/luna/binary/analysis.rb
143
144
  - lib/luna/binary/build.rb
144
145
  - lib/luna/binary/common/common.rb