xcody 0.4.0 → 0.4.1
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/README.md +6 -0
- data/lib/xcody.rb +8 -6
- data/lib/xcody/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ac0fa3c20884071677bd9bd9bc580348fa18935
|
4
|
+
data.tar.gz: 4a90b5617c948a388c7284e4e0972e969879555a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42102563b27e5346cf9ab20a7a3b9fce6290009057fd2077a276df6a20c66dc8b5388eb20d788720b38f295098f56a6462e0cd8cbb3ea49cbeea95dbd3bb234e
|
7
|
+
data.tar.gz: c4db84832e6a42f5257b5f30c668e74bc0002f16ea43baadab8ea15e0b170d1f5f057e2a91650d19091a2d54c3daa1e5cf6678977450e1b56d4ef7622ad31091
|
data/README.md
CHANGED
@@ -24,6 +24,12 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
```
|
26
26
|
# Build "your_project.xcodeproj"
|
27
|
+
log_file = "file/to/path.log"
|
28
|
+
|
29
|
+
Xcody.new.xcode_build.project("your_project.xcodeproj").build.run(log_file, true)
|
30
|
+
|
31
|
+
or
|
32
|
+
|
27
33
|
Xcody.new.xcode_build.project("your_project.xcodeproj").build.run
|
28
34
|
```
|
29
35
|
|
data/lib/xcody.rb
CHANGED
@@ -164,17 +164,17 @@ class Xcody
|
|
164
164
|
@xcode_build_cmd = ""
|
165
165
|
end
|
166
166
|
|
167
|
-
def run(log_file = "./tmp/build_log.txt")
|
167
|
+
def run(log_file = "./tmp/build_log.txt", verb = false)
|
168
168
|
puts "running with #{@xcode_build_cmd.inspect}"
|
169
169
|
|
170
|
-
run_command @xcode_build_cmd, log_file
|
170
|
+
run_command @xcode_build_cmd, log_file, verb
|
171
171
|
end
|
172
172
|
|
173
|
-
def xcpretty(log_file = "./tmp/build_log.txt", option = [])
|
173
|
+
def xcpretty(log_file = "./tmp/build_log.txt", option = [], verb = false)
|
174
174
|
command = @xcode_build_cmd.concat(%( | xcpretty )).concat(option.join(" "))
|
175
175
|
puts "running with #{command}"
|
176
176
|
|
177
|
-
run_command command, log_file
|
177
|
+
run_command command, log_file, verb
|
178
178
|
end
|
179
179
|
|
180
180
|
private
|
@@ -183,18 +183,20 @@ class Xcody
|
|
183
183
|
`xcode-select -p 2> /dev/null`.strip.sub(%r{/Contents/Developer\z}, "")
|
184
184
|
end
|
185
185
|
|
186
|
-
def run_command(command, log_file)
|
186
|
+
def run_command(command, log_file, verb = false)
|
187
187
|
log_file_dir = Pathname.new(log_file).dirname
|
188
188
|
FileUtils.mkdir_p(log_file_dir)
|
189
189
|
|
190
190
|
out_with_err, status = Open3.capture2e command
|
191
|
+
|
192
|
+
puts out_with_err if verb
|
193
|
+
|
191
194
|
exit_code = status.exitstatus
|
192
195
|
case exit_code
|
193
196
|
when 0
|
194
197
|
File.write(log_file, out_with_err)
|
195
198
|
puts "Build success. Logfile is in #{log_file}"
|
196
199
|
else
|
197
|
-
File.write(log_file, out_with_err)
|
198
200
|
File.write(log_file, out_with_err)
|
199
201
|
puts "Exit build with error status: #{exit_code}"
|
200
202
|
end
|
data/lib/xcody/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcody
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcpretty
|