gct 0.1.2 → 0.1.3
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 +4 -4
- data/lib/gct/command/build/r.rb +60 -0
- data/lib/gct/command/build.rb +13 -0
- data/lib/gct/command.rb +2 -0
- data/lib/gct/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa28dc842327c6ec08bd44600b7457a533b14274ab3020861c012f427a2a9192
|
4
|
+
data.tar.gz: d8abd745b04e82728101ff0129a920265cbc5acd79f87ae5360d9e41ae9c724f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8256de21008be3552722b25e62108a9b53a383c4937ed33a15d2ed8611677cf8e757f5f4e815bef0cd0746875e55885df041c6f245f96c17f7f915c1b6a53617
|
7
|
+
data.tar.gz: f2d0db217f7cb89a5236933c0005f99d44f80e7b2e77a4cf6ff4f25333c5297c0da17334e8068b61378cd10a31f4bd72fe2f7e3504013d687fee132aa9ffb6c9
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Gct
|
2
|
+
class Command
|
3
|
+
class Build < Command
|
4
|
+
class R < Build
|
5
|
+
|
6
|
+
self.summary = '运行R脚本'
|
7
|
+
self.description = <<-DESC
|
8
|
+
运行R脚本.
|
9
|
+
DESC
|
10
|
+
|
11
|
+
self.arguments = [
|
12
|
+
]
|
13
|
+
|
14
|
+
def initialize(argv)
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate!
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
buildR
|
24
|
+
end
|
25
|
+
|
26
|
+
def buildR
|
27
|
+
proj = ''
|
28
|
+
Dir.entries(Dir.pwd).each do |sub|
|
29
|
+
if sub.include? '.xcodeproj'
|
30
|
+
proj = sub
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
if proj == ''
|
35
|
+
puts '没有找到.xcodeproj文件'.red
|
36
|
+
else
|
37
|
+
project_path = File.join(File.dirname(__FILE__), "./" + proj)
|
38
|
+
project = Xcodeproj::Project.open(project_path)
|
39
|
+
|
40
|
+
objects = project.objects
|
41
|
+
findR = false
|
42
|
+
objects.each do |obj|
|
43
|
+
if obj.instance_of?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) and obj.name == "[GCT] create R"
|
44
|
+
findR = true
|
45
|
+
script_export = "export project_path=$(cd `dirname $0`; pwd) \nexport PODS_ROOT=${project_path}\"/Pods\" \nexport SRCROOT=${project_path} \n"
|
46
|
+
exe_script = script_export + obj.shell_script
|
47
|
+
system exe_script
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
if !findR
|
52
|
+
puts "没有找到 '[GCT] create R' 脚本".red
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
data/lib/gct/command.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'colored2'
|
2
2
|
require 'claide'
|
3
3
|
require 'molinillo/errors'
|
4
|
+
require 'xcodeproj'
|
4
5
|
|
5
6
|
module Molinillo
|
6
7
|
class ResolverError
|
@@ -19,6 +20,7 @@ module Gct
|
|
19
20
|
require 'gct/command/config'
|
20
21
|
require 'gct/command/analyze'
|
21
22
|
require 'gct/command/op'
|
23
|
+
require 'gct/command/build'
|
22
24
|
|
23
25
|
self.abstract_command = true
|
24
26
|
self.command = 'gct'
|
data/lib/gct/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jieming
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -113,6 +113,8 @@ files:
|
|
113
113
|
- lib/gct.rb
|
114
114
|
- lib/gct/command.rb
|
115
115
|
- lib/gct/command/analyze.rb
|
116
|
+
- lib/gct/command/build.rb
|
117
|
+
- lib/gct/command/build/r.rb
|
116
118
|
- lib/gct/command/config.rb
|
117
119
|
- lib/gct/command/config/get.rb
|
118
120
|
- lib/gct/command/config/set.rb
|