xcjobs 0.0.6 → 0.0.7
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 +66 -33
- data/lib/xcjobs/certificate.rb +5 -1
- data/lib/xcjobs/coverage.rb +1 -1
- data/lib/xcjobs/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: e6b499b7d8707eaf6a61042e33d345dc207c2697
|
4
|
+
data.tar.gz: a80560d7918206203c7e66647b3ea66640fac2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db219848a537f19c8390a5cc61fed225334137b50d668c44918f40f6f44d312052c6178f497bdb398a54e042e44c72506b4d3cf97c55da84d89de34fb9dd61aa
|
7
|
+
data.tar.gz: 09e96ba95bec3886b4d4b5d9b6c0b041a3ee0d23efa97d293e0ab9f23b584a0c72018b181a7f25f5e61cb2b95dedb419d0fbc369ffdc2d9cde57125a50cbaec0
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# XCJobs
|
2
2
|
[](http://badge.fury.io/rb/xcjobs) [](https://travis-ci.org/kishikawakatsumi/xcjobs) [](https://coveralls.io/r/kishikawakatsumi/xcjobs?branch=master) [](https://codeclimate.com/github/kishikawakatsumi/xcjobs) [](https://gemnasium.com/kishikawakatsumi/xcjobs)
|
3
3
|
|
4
|
-
|
5
4
|
Support the automation of release process of iOS/OSX apps with CI
|
6
5
|
|
7
6
|
## Installation
|
@@ -26,12 +25,12 @@ Or install it yourself as:
|
|
26
25
|
|
27
26
|
```ruby
|
28
27
|
XCJobs::Test.new do |t|
|
29
|
-
t.workspace =
|
30
|
-
t.scheme =
|
31
|
-
t.configuration =
|
32
|
-
t.add_destination(
|
33
|
-
t.add_destination(
|
34
|
-
t.formatter =
|
28
|
+
t.workspace = 'Example'
|
29
|
+
t.scheme = 'Example'
|
30
|
+
t.configuration = 'Release'
|
31
|
+
t.add_destination('name=iPad 2,OS=7.1')
|
32
|
+
t.add_destination('name=iPad Air,OS=8.1')
|
33
|
+
t.formatter = 'xcpretty -c'
|
35
34
|
end
|
36
35
|
```
|
37
36
|
|
@@ -51,12 +50,12 @@ xcodebuild test -workspace Example.xcworkspace -scheme Example -sdk iphonesimula
|
|
51
50
|
|
52
51
|
```ruby
|
53
52
|
XCJobs::Build.new do |t|
|
54
|
-
t.workspace =
|
55
|
-
t.scheme =
|
56
|
-
t.configuration =
|
57
|
-
t.signing_identity =
|
58
|
-
t.build_dir =
|
59
|
-
t.formatter =
|
53
|
+
t.workspace = 'Example'
|
54
|
+
t.scheme = 'Example'
|
55
|
+
t.configuration = 'Release'
|
56
|
+
t.signing_identity = 'iPhone Distribution: Katsumi Kishikawa'
|
57
|
+
t.build_dir = 'build'
|
58
|
+
t.formatter = 'xcpretty -c'
|
60
59
|
end
|
61
60
|
```
|
62
61
|
|
@@ -76,19 +75,19 @@ xcodebuild build -workspace Example.xcworkspace -scheme Example -configuration R
|
|
76
75
|
|
77
76
|
```ruby
|
78
77
|
XCJobs::Archive.new do |t|
|
79
|
-
t.workspace =
|
80
|
-
t.scheme =
|
81
|
-
t.configuration =
|
82
|
-
t.signing_identity =
|
83
|
-
t.build_dir =
|
84
|
-
t.formatter =
|
78
|
+
t.workspace = 'Example'
|
79
|
+
t.scheme = 'Example'
|
80
|
+
t.configuration = 'Release'
|
81
|
+
t.signing_identity = 'iPhone Distribution: Katsumi Kishikawa'
|
82
|
+
t.build_dir = 'build'
|
83
|
+
t.formatter = 'xcpretty -c'
|
85
84
|
end
|
86
85
|
|
87
86
|
XCJobs::Export.new do |t|
|
88
|
-
t.archive_path = File.join(
|
89
|
-
t.export_path = File.join(
|
90
|
-
t.export_provisioning_profile =
|
91
|
-
t.formatter =
|
87
|
+
t.archive_path = File.join('build', 'Example.xcarchive')
|
88
|
+
t.export_path = File.join('build', 'Example.ipa')
|
89
|
+
t.export_provisioning_profile = 'Ad_Hoc.mobileprovision'
|
90
|
+
t.formatter = 'xcpretty -c'
|
92
91
|
end
|
93
92
|
```
|
94
93
|
|
@@ -115,20 +114,31 @@ xcodebuild -exportArchive -exportFormat IPA -archivePath build/Example.xcarchive
|
|
115
114
|
|
116
115
|
```ruby
|
117
116
|
XCJobs::Distribute::Crittercism.new do |t|
|
118
|
-
t.app_id =
|
119
|
-
t.key =
|
120
|
-
t.dsym = File.join(
|
117
|
+
t.app_id = 'xxx...'
|
118
|
+
t.key = 'xxx...'
|
119
|
+
t.dsym = File.join('build', 'dSYMs.zip')
|
121
120
|
end
|
122
121
|
|
123
122
|
XCJobs::Distribute::TestFlight.new do |t|
|
124
|
-
t.file = File.join(
|
125
|
-
t.api_token =
|
126
|
-
t.team_token =
|
123
|
+
t.file = File.join('build', "#{Example}.ipa")
|
124
|
+
t.api_token = 'xxx...'
|
125
|
+
t.team_token = 'xxx...'
|
127
126
|
t.notify = true
|
128
127
|
t.replace = true
|
129
|
-
t.distribution_lists =
|
128
|
+
t.distribution_lists = 'Dev'
|
130
129
|
t.notes = "Uploaded: #{DateTime.now.strftime("%Y/%m/%d %H:%M:%S")}"
|
131
130
|
end
|
131
|
+
|
132
|
+
XCJobs::Distribute::DeployGate.new do |t|
|
133
|
+
t.owner_name = 'kishikawakatsumi'
|
134
|
+
t.file = File.join('build', "#{Example}.ipa")
|
135
|
+
t.token = 'xxx...'
|
136
|
+
t.message = "Uploaded: #{DateTime.now.strftime("%Y/%m/%d %H:%M:%S")}" # optional
|
137
|
+
t.distribution_key = 'xxx...' # optional
|
138
|
+
t.release_note = '...' # optional
|
139
|
+
t.disable_notify = false # optional
|
140
|
+
t.visibility = 'public' # optional
|
141
|
+
end
|
132
142
|
```
|
133
143
|
|
134
144
|
```shell
|
@@ -136,6 +146,7 @@ $ rake -T
|
|
136
146
|
|
137
147
|
rake distribute:crittercism # upload dSYMs to Crittercism
|
138
148
|
rake distribute:testflight # upload IPA to TestFlight
|
149
|
+
rake distribute:deploygate # upload IPA to DeployGate
|
139
150
|
```
|
140
151
|
|
141
152
|
### Install/Remove certificates (For Travis CI)
|
@@ -150,8 +161,8 @@ XCJobs::Certificate.new do |t|
|
|
150
161
|
t.add_certificate('./certificates/adhoc.cer')
|
151
162
|
t.add_certificate('./certificates/adhoc.p12', passphrase)
|
152
163
|
|
153
|
-
t.add_profile(
|
154
|
-
t.add_profile(
|
164
|
+
t.add_profile('AppStore')
|
165
|
+
t.add_profile('Ad Hoc')
|
155
166
|
end
|
156
167
|
```
|
157
168
|
|
@@ -168,7 +179,7 @@ rake certificates:remove # remove certificates
|
|
168
179
|
|
169
180
|
```ruby
|
170
181
|
XCJobs::InfoPlist::Version.new do |t|
|
171
|
-
t.path = File.join(
|
182
|
+
t.path = File.join('Example', 'Info.plist')
|
172
183
|
end
|
173
184
|
```
|
174
185
|
|
@@ -184,6 +195,28 @@ rake version:set_build_number # Sets build version to number of commits
|
|
184
195
|
rake version:set_build_version # Sets build version to last git commit hash
|
185
196
|
```
|
186
197
|
|
198
|
+
### Measuring code coverage
|
199
|
+
|
200
|
+
```ruby
|
201
|
+
XCJobs::Test.new('test:ios') do |t|
|
202
|
+
t.workspace = 'Example'
|
203
|
+
t.scheme = 'Example'
|
204
|
+
t.configuration = 'Release'
|
205
|
+
t.add_destination('name=iPhone 5s,OS=8.1')
|
206
|
+
t.coverage = true # enable code coverage
|
207
|
+
t.formatter = 'xcpretty -c'
|
208
|
+
end
|
209
|
+
```
|
210
|
+
|
211
|
+
### Send coverage report to Coveralls
|
212
|
+
|
213
|
+
```ruby
|
214
|
+
XCJobs::Coverage::Coveralls.new() do |t|
|
215
|
+
t.add_extension('.m')
|
216
|
+
t.add_exclude('Example')
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
187
220
|
## Automate with Travis CI
|
188
221
|
|
189
222
|
```ruby
|
data/lib/xcjobs/certificate.rb
CHANGED
@@ -38,7 +38,11 @@ module XCJobs
|
|
38
38
|
sh %[security create-keychain -p "" "#{keychain_name}"]
|
39
39
|
|
40
40
|
@certificates.each do |certificate, passphrase|
|
41
|
-
|
41
|
+
puts %[security import "#{certificate}" -k #{keychain_name} -P "********" -T /usr/bin/codesign]
|
42
|
+
out, status = Open3.capture2(*(['security', 'import', "#{certificate}", '-k', "#{keychain_name}", '-P', "#{passphrase}", '-T', '/usr/bin/codesign']))
|
43
|
+
if !status.success?
|
44
|
+
fail'failed to import keychain'
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
sh %[security default-keychain -s "#{keychain_name}"]
|
data/lib/xcjobs/coverage.rb
CHANGED
data/lib/xcjobs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcjobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kishikawa katsumi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|