ios_build_kit 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0f79d49883926329cab313795c0b2117054e131a
4
+ data.tar.gz: 715043655abfdac1e8d4a07b165cc56f2e7342f1
5
+ SHA512:
6
+ metadata.gz: 09c60c8b413cf0538f9ac75933aaa3a9b1bac63de9375efe258d7204e01760bdf68674c9ffa909b854882c1da46d3c51cd981fc51e87599c7275911b2c735d3d
7
+ data.tar.gz: b291a043aa85897a81af74ec4fc64c7445e7a03baf6abc0ec715dfd747c0c1752092df848ac08e9900ebc1f8eed42c80bfa37c0a0db7b410feff5470fe1269ea
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,120 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ios_build_kit (0.0.1)
5
+ commander (~> 4.1)
6
+ json (~> 1.8)
7
+ nomad-cli (~> 0.0.2)
8
+ paint (~> 0.8)
9
+ rmagick (~> 2.13)
10
+
11
+ GEM
12
+ remote: http://rubygems.org/
13
+ specs:
14
+ aws-sdk (1.34.0)
15
+ json (~> 1.4)
16
+ nokogiri (>= 1.4.4)
17
+ uuidtools (~> 2.1)
18
+ certified (0.1.1)
19
+ commander (4.1.6)
20
+ highline (~> 1.6.11)
21
+ cupertino (0.9.5)
22
+ certified (>= 0.1.0)
23
+ commander (~> 4.1.2)
24
+ mechanize (~> 2.5.1)
25
+ nokogiri (~> 1.5.9)
26
+ security (~> 0.1.2)
27
+ shenzhen (>= 0.0.1)
28
+ term-ansicolor (~> 1.0.7)
29
+ terminal-table (~> 1.4.5)
30
+ diff-lcs (1.2.5)
31
+ domain_name (0.5.15)
32
+ unf (>= 0.0.5, < 1.0.0)
33
+ dotenv (0.9.0)
34
+ dubai (0.0.5)
35
+ commander (~> 4.1)
36
+ json
37
+ rubyzip
38
+ sinatra (~> 1.3)
39
+ terminal-table (~> 1.4)
40
+ faraday (0.8.8)
41
+ multipart-post (~> 1.2.0)
42
+ faraday_middleware (0.9.0)
43
+ faraday (>= 0.7.4, < 0.9)
44
+ highline (1.6.20)
45
+ houston (2.0.0)
46
+ commander (~> 4.1)
47
+ json
48
+ json (1.8.1)
49
+ mechanize (2.5.1)
50
+ domain_name (~> 0.5, >= 0.5.1)
51
+ mime-types (~> 1.17, >= 1.17.2)
52
+ net-http-digest_auth (~> 1.1, >= 1.1.1)
53
+ net-http-persistent (~> 2.5, >= 2.5.2)
54
+ nokogiri (~> 1.4)
55
+ ntlm-http (~> 0.1, >= 0.1.1)
56
+ webrobots (~> 0.0, >= 0.0.9)
57
+ mime-types (1.25.1)
58
+ multipart-post (1.2.0)
59
+ net-http-digest_auth (1.4)
60
+ net-http-persistent (2.9.4)
61
+ net-sftp (2.1.2)
62
+ net-ssh (>= 2.6.5)
63
+ net-ssh (2.7.0)
64
+ nokogiri (1.5.11)
65
+ nomad-cli (0.0.2)
66
+ cupertino
67
+ dubai
68
+ houston
69
+ shenzhen
70
+ venice
71
+ ntlm-http (0.1.1)
72
+ paint (0.8.7)
73
+ rack (1.5.2)
74
+ rack-protection (1.5.2)
75
+ rack
76
+ rake (10.1.1)
77
+ rmagick (2.13.2)
78
+ rspec (2.14.1)
79
+ rspec-core (~> 2.14.0)
80
+ rspec-expectations (~> 2.14.0)
81
+ rspec-mocks (~> 2.14.0)
82
+ rspec-core (2.14.7)
83
+ rspec-expectations (2.14.4)
84
+ diff-lcs (>= 1.1.3, < 2.0)
85
+ rspec-mocks (2.14.4)
86
+ rubyzip (0.9.9)
87
+ security (0.1.2)
88
+ shenzhen (0.5.4)
89
+ aws-sdk (~> 1.0)
90
+ commander (~> 4.1)
91
+ dotenv (~> 0.7)
92
+ faraday (~> 0.8)
93
+ faraday_middleware (~> 0.9)
94
+ json (~> 1.8)
95
+ net-sftp (~> 2.1.2)
96
+ sinatra (1.4.4)
97
+ rack (~> 1.4)
98
+ rack-protection (~> 1.4)
99
+ tilt (~> 1.3, >= 1.3.4)
100
+ term-ansicolor (1.0.7)
101
+ terminal-table (1.4.5)
102
+ tilt (1.4.1)
103
+ unf (0.1.3)
104
+ unf_ext
105
+ unf_ext (0.0.6)
106
+ uuidtools (2.1.4)
107
+ venice (0.2.0)
108
+ commander (~> 4.1)
109
+ json
110
+ terminal-table (~> 1.4)
111
+ webrobots (0.1.1)
112
+
113
+ PLATFORMS
114
+ ruby
115
+
116
+ DEPENDENCIES
117
+ bundler
118
+ ios_build_kit!
119
+ rake
120
+ rspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2014 Adam Waite. All rights reserved.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,269 @@
1
+ iOS BuildKit
2
+ ===
3
+
4
+ BuildKit is a modular command line interface for automating iOS project builds. BuildKit aims to relieve you from the pain of configuring continuous integration environments and build processes.
5
+
6
+ Bundled build tasks include:
7
+
8
+ - Increment the build number
9
+ - Draw the build number on the app icon
10
+ - Build the app
11
+ - Run unit tests
12
+ - Generate an .ipa artefact
13
+
14
+ BuildKit is distributed as a Ruby gem with an executable that can be launched either in a continous integration server environment or on your development machine. The process is configured with a simple YAML file that describes the tasks to run and your project-specific options. This means that you can tailor the build process to meet your requirements.
15
+
16
+ **Note**
17
+
18
+ This repository was previosly known as Xcode-Project. It previously contained a project generator as well as a less developed build toolkit. The generator was removed due to the rapid advances in iOS technology. If you would like to continue using the previous version it's available [here](https://github.com/adamwaite/iOS-Build-Kit/releases).
19
+
20
+ ## Requirements
21
+
22
+ - **Ruby 2.0+**: BuildKit is written and run with Ruby, you'll need a version higher than 2.0 because of the modern syntax. Check your Ruby version with `ruby -v`. [RVM](http://rvm.io/) makes it easy should you need to update.
23
+ - **Xcode command line tools**: `xcode-select --install`
24
+ - xctool: BuildKit uses [Facebook's xctool](https://github.com/facebook/xctool) to translate the standard Xcode CLI output from computer garbage to human readable form. Install with: `brew install xctool`
25
+ - **ImageMagick**: Command line graphics library used to draw on the app icon. Install with: `brew install imagemagick`.
26
+ - **GhostScript**: Command line text rendering library used to draw the version number on the app icon. Install with: `brew install ghostscript`.
27
+
28
+ ## Installation
29
+
30
+ After the requirments have been met, BuildKit can be installed with:
31
+
32
+ `gem install buildkit`
33
+
34
+ ## Usage
35
+
36
+ BuildKit is launched from a command line environment with:
37
+
38
+ ```
39
+ buildkit
40
+ ```
41
+
42
+ Pass a configuration file to BuildKit with:
43
+
44
+ ```
45
+ buildkit your-config-file.yml
46
+ ```
47
+
48
+ ### Configuration Files
49
+
50
+ The configuration file describes three things:
51
+
52
+ 1. Task modules to run (and task-specific options)
53
+ 2. Project configuration
54
+ 3. User preferences
55
+
56
+ An example configuration file:
57
+
58
+ ```yaml
59
+ :tasks:
60
+ :increment_version:
61
+ :run: true
62
+ :options:
63
+ :decorate_icon:
64
+ :run: true
65
+ :options:
66
+ :xcode_build:
67
+ :run: true
68
+ :options:
69
+ :log: true
70
+ :run_tests:
71
+ :run: false
72
+ :options:
73
+ :log: true
74
+ :create_ipa:
75
+ :run: true
76
+ :options:
77
+ :log: true
78
+
79
+ :configuration:
80
+ :app_name: "BuildKit"
81
+ :workspace: "/Users/adamwaite/iOS/Lib/BuildKit/iOS-Build-Kit/example/BuildKit.xcworkspace"
82
+ :info_plist: "/Users/adamwaite/iOS/Lib/BuildKit/iOS-Build-Kit/example/BuildKit/BuildKit-Info.plist"
83
+ :build_configuration: "Release"
84
+ :scheme: "BuildKit"
85
+ :sdk: "iphoneos"
86
+ :provisioning_profile: "/Users/adamwaite/iOS/Lib/BuildKit/iOS-Build-Kit/example/Provisioning/BuildKitTest.mobileprovision"
87
+ :code_sign: "iPhone Distribution: Alpaca Labs"
88
+ :icon_dir: "/Users/adamwaite/iOS/Lib/BuildKit/iOS-Build-Kit/example/BuildKit/Icon/"
89
+ :build_dir: "/Users/adamwaite/iOS/Lib/BuildKit/iOS-Build-Kit/example/Builds/"
90
+
91
+ :preferences:
92
+ :reports: "/Users/adamwaite/iOS/Lib/BuildKit/Reports/"
93
+ ```
94
+
95
+ #### Setting Tasks
96
+
97
+ The `:tasks:` symbol is used to define what tasks you would like your process to run. If `:run:` is set to `true` on a particular task then that task will be executed as part of the build process. Setting `:run:` to `false` will mean that the task is skipped (note that some tasks depend on others, and may cause a graceful failure). In the examle above all tasks but for `run_tests` will be executed.
98
+
99
+ The tasks will be run in the order that they appear in the list. It's recommended to follow the order shown in the example as they've been ordered to satisfy requirments and provide more value to the process. In the example the version is incremented with `increment_version`, followed by the newly incremented version being rendered on the app icon with `decorate_icon`, finally `xcode_build` and `create_ipa` are run and the version number appears on icon if the generated ipa is installed on a device.
100
+
101
+ Anything passed with the `:options:` symbol will be provided as an option. For example, taking the example configuration file above the `:log:` option on the `run_tests` task is set to `true` so the test output will be printed to the CLI.
102
+
103
+ The Tasks section in this README describes all of the options available to each task.
104
+
105
+ #### Setting Project Configuration
106
+
107
+ To run the task modules successfully requires some project-specific configuration, this is done under the `:configuration:` symbol.
108
+
109
+ - `:app_name:`: Your app's name!
110
+ - `:workspace:`: The path to your workspace (note that single Xcode project files aren't supported).
111
+ - `:info_plist:`: The path to your workspace (note that single Xcode project files aren't supported).
112
+ - `:build_configuration:`: Your build configuration (normally "Release" or suchlike)
113
+ - `:scheme:`: Project scheme to build
114
+ - `:sdk:`: SDK to build with (example: "iphoneos")
115
+ - `:provisioning_profile:`: Path to a provisioning profile to sign the app with.
116
+ - `:code_sign:`: The code signature, this is found in Xcode next to a selected provisioning profile (example: "iPhone Distribution: Alpaca Labs"). I recommend this incredible [Quick Look plug in](https://github.com/chockenberry/Provisioning) if you want to inspect profiles.
117
+ - `:icon_dir:`: The path to a directory containing you icon image files. More on this in the Tasks `decorate_icon` section of this README.
118
+ - `:build_dir:`: The path to drop any build and ipa files after they have been created.
119
+
120
+ Note: if some required configuration has not been provided, or an invalid location has been provided for an option that requires a path, then BuildKit will gracefully fail.
121
+
122
+ #### Setting User Preferences
123
+
124
+ BuildKit can be configured to suit your own preference too. This is done under the `:preferences:` symbol. For example, to switch on build report generation set the `:reports:` symbol to `true`. User preferences are further described in the User Preferences section of this README.
125
+
126
+ ## Build Tasks
127
+
128
+ BuildKit comes packaged with the following task modules:
129
+
130
+ - `increment_version`: Increment the build number
131
+ - `decorate_icon`: Overlay the build number on the application icon
132
+ - `xcode_build`: Build the app
133
+ - `run_tests`: Run unit tests
134
+ - `create_ipa`: Generate an .ipa artefact
135
+
136
+ ### increment_version
137
+
138
+ Increments the build version number in the Info-plist:
139
+
140
+ ![increment_version](resources/increment_version.png)
141
+
142
+ Requires configuration:
143
+ - `:info_plist:`
144
+
145
+ ### decorate_icon
146
+
147
+ Duplicates you app icon files and aints the version number on top (incremented with `increment_version` or not).
148
+
149
+ ![decorate_icon](resources/decorate_icon.png)
150
+ ![decorate_icon](resources/decorate_icon2.png)
151
+
152
+ *Decorate icon requires some convention to be followed*: Your app icon files should be contained in a dedicated directory of their own. To have the icon version number appear on top of a generated ipa requires you to drop the icon directory in to Xcode as a folder reference rather than a group. Then set the icon files in your Info-plist as:
153
+
154
+ ```
155
+ <key>CFBundleIcons</key>
156
+ <dict>
157
+ <key>CFBundlePrimaryIcon</key>
158
+ <dict>
159
+ <key>CFBundleIconFiles</key>
160
+ <array>
161
+ <string>CONTAININGFOLDER/Decorated-ICONFILENAME</string>
162
+ <string>CONTAININGFOLDER/Decorated-ICONFILENAME</string>
163
+ <string>CONTAININGFOLDER/Decorated-ICONFILENAME</string>
164
+ </array>
165
+ </dict>
166
+ </dict>
167
+ ```
168
+
169
+ If you're unsure check the example project in the repo.
170
+
171
+ Requires configuration:
172
+ - `:info_plist:`
173
+ - `:icon_dir:`
174
+
175
+ ### xcode_build
176
+
177
+ Builds the project:
178
+
179
+ ![xcode_build](resources/xcode_build.png)
180
+
181
+ Requires configuration:
182
+ - `:app_name:`
183
+ - `:workspace:`
184
+ - `:sdk:`
185
+ - `:build_configuration:`
186
+ - `:build_dir:`
187
+ - `:scheme:`
188
+
189
+ ### run_tests
190
+
191
+ Runs unit tests:
192
+
193
+ ![run_tests](resources/run_tests.png)
194
+
195
+ *Note regarding Kiwi*: As of present you need to use 'edge Kiwi' due to [Kiwi issue 390](https://github.com/allending/Kiwi/issues/390). To used the latest Kiwi put `pod 'Kiwi/XCTest', git: 'https://github.com/allending/Kiwi'` in your Podfile.
196
+
197
+ Requires configuration:
198
+ - `:workspace:`
199
+ - `:scheme:`
200
+
201
+ ### create_ipa
202
+
203
+ Creates an .ipa build artefact.
204
+
205
+ ![create_ipa](resources/create_ipa.png)
206
+
207
+ Requires previous tasks:
208
+ - `xcode_build`
209
+
210
+ Requires configuration:
211
+ - `:workspace:`
212
+ - `:scheme:`
213
+
214
+ ## User Preferences
215
+
216
+ BuildKit includes features that can be enabled under the `:preferences:` symbol of a config file. This is a space to customise your build process.
217
+
218
+ ### User Preferences: Create Reports
219
+
220
+ Set `:reports:` to a directory in your config file to create a JSON report containing the project configuration, build time, build outputs and test outputs after a BuildKit run has completed.
221
+
222
+ Leaving the :reports:` preference blank will skip report generation.
223
+
224
+ ## Examples
225
+
226
+ An example workspace has been included in the repo if you want to try it out. You'll need to change the paths in the `build_config.yml` configuration file first and run a `pod install`.
227
+
228
+ ## Roadmap
229
+
230
+ Lots of plans for BuildKit:
231
+
232
+ - Cover with RSpec specs (in progress)
233
+ - Create a build task module to enable artefact distribution by wrapping [Shenzhen](https://github.com/nomad/shenzhen).
234
+ - Add a means to allow custom task modules to be added to the process.
235
+ - Add a task to email build reports.
236
+ - Make `decorate_icon` compatible with Xcode 5 asset catalogues.
237
+ - Add a generator for config files.
238
+ - Add some colour to the output.
239
+ - Beautify the reports.
240
+
241
+ ## Contributing
242
+
243
+ All pull requests welcome! Please update the README with any new features.
244
+
245
+ ## Contact
246
+
247
+ [@adamwaite](https://twitter.com/AdamWaite)
248
+
249
+ ## License
250
+
251
+ Copyright (c) 2014 Adam Waite. All rights reserved.
252
+
253
+ Permission is hereby granted, free of charge, to any person obtaining a copy
254
+ of this software and associated documentation files (the "Software"), to deal
255
+ in the Software without restriction, including without limitation the rights
256
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
257
+ copies of the Software, and to permit persons to whom the Software is
258
+ furnished to do so, subject to the following conditions:
259
+
260
+ The above copyright notice and this permission notice shall be included in
261
+ all copies or substantial portions of the Software.
262
+
263
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
264
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
265
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
266
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
267
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
268
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
269
+ THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,25 @@
1
+ = ios_build_kit
2
+
3
+ See https://github.com/adamwaite/iOS-Build-Kit
4
+
5
+ Created by @adamwaite.
6
+
7
+ Copyright (c) 2014 Adam Waite. All rights reserved.
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in
17
+ all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
+ THE SOFTWARE.