cocoapods-modularization 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c5a500901cd88588b476ec6b16758dea8213c7680630de4326645dd8144b48b
|
4
|
+
data.tar.gz: d447517bd3fc292ca2f4a1dc6f5199565663acbcec1da3264bec30188d97ebcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9714988fbdc107528beb1968868a8746ade2a781e10193db092f6300176457fbe22c51f6eb2843bcd153be37138c6ca4d34f1bfb1e46b7f11b72437780566e8
|
7
|
+
data.tar.gz: 641e59518f4e0633bc8b7aab3282f711a3e19e8afc70bd22880c3f08ed669856368736c90fdc7923c873e4bdf7a69f8d464d5e985848b6cc03306049b017f488
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
class Command
|
5
|
+
class Mod < Command
|
6
|
+
class Info < Mod
|
7
|
+
|
8
|
+
self.summary = 'Fetch info of a repo from remote'
|
9
|
+
|
10
|
+
self.description = <<-DESC
|
11
|
+
DESC
|
12
|
+
|
13
|
+
self.arguments = [
|
14
|
+
CLAide::Argument.new('NAME', true)
|
15
|
+
]
|
16
|
+
|
17
|
+
def self.options
|
18
|
+
[
|
19
|
+
['--use-binary', 'Use this flag if the component supposed to be a binary, otherwise a source version will be added into dependencies']
|
20
|
+
].concat(super)
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(argv)
|
24
|
+
@name = argv.shift_argument
|
25
|
+
@use_binary = argv.flag?('use-binary')
|
26
|
+
super
|
27
|
+
end
|
28
|
+
|
29
|
+
def validate!
|
30
|
+
super
|
31
|
+
help! 'A name for the Pod is required.' unless @name
|
32
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
33
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
34
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
35
|
+
end
|
36
|
+
|
37
|
+
def run
|
38
|
+
repo_url = String.new
|
39
|
+
if @use_binary
|
40
|
+
repo_url = Private::PrivateCache.binary_repo_url
|
41
|
+
else
|
42
|
+
repo_url = Private::PrivateCache.source_repo_url
|
43
|
+
end
|
44
|
+
|
45
|
+
# 如果工作区有存在的Repo,先删除后clone
|
46
|
+
if File.exist?("#{Private::PrivateCache.root_path}/Repo")
|
47
|
+
FileUtils.rm_rf("#{Private::PrivateCache.root_path}/Repo")
|
48
|
+
end
|
49
|
+
|
50
|
+
system_build("/usr/bin/git clone #{repo_url} #{Private::PrivateCache.root_path}/Repo -b master --single-branch --depth 1")
|
51
|
+
|
52
|
+
# 遍历文件夹
|
53
|
+
max_version = Dir.glob("#{Private::PrivateCache.root_path}/Repo/#{@name}/*").map { |e| Gem::Version.new(e.match(/\d{1,2}\.\d{1,2}\.\d{1,2}/).to_s) }.max.to_s
|
54
|
+
|
55
|
+
puts versions
|
56
|
+
end
|
57
|
+
|
58
|
+
private
|
59
|
+
def system_build(command)
|
60
|
+
output = `#{command}`.lines.to_a
|
61
|
+
|
62
|
+
if $?.exitstatus != 0
|
63
|
+
UI::BuildFailedReport.report(command, output)
|
64
|
+
Process.exit
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -8,6 +8,7 @@ require 'cocoapods-modularization/command/mod/add'
|
|
8
8
|
require 'cocoapods-modularization/command/mod/update'
|
9
9
|
require 'cocoapods-modularization/command/mod/base'
|
10
10
|
require 'cocoapods-modularization/command/mod/template'
|
11
|
+
require 'cocoapods-modularization/command/mod/info'
|
11
12
|
|
12
13
|
module Pod
|
13
14
|
class Command
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module CocoapodsModularization
|
2
|
-
VERSION = "0.1.
|
3
|
-
end
|
2
|
+
VERSION = "0.1.2"
|
3
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-modularization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lazy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/cocoapods-modularization/command/mod/binary.rb
|
70
70
|
- lib/cocoapods-modularization/command/mod/config.rb
|
71
71
|
- lib/cocoapods-modularization/command/mod/create.rb
|
72
|
+
- lib/cocoapods-modularization/command/mod/info.rb
|
72
73
|
- lib/cocoapods-modularization/command/mod/inspect.rb
|
73
74
|
- lib/cocoapods-modularization/command/mod/source.rb
|
74
75
|
- lib/cocoapods-modularization/command/mod/sync.rb
|
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
- !ruby/object:Gem::Version
|
107
108
|
version: '0'
|
108
109
|
requirements: []
|
109
|
-
rubygems_version: 3.0.3
|
110
|
+
rubygems_version: 3.0.3.1
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: A longer description of cocoapods-modularization.
|