ios_build_kit 0.0.5 → 0.0.6
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/Gemfile.lock +5 -5
- data/README.md +4 -12
- data/lib/ios_build_kit/task_runner.rb +4 -4
- data/lib/ios_build_kit/tasks/decorate_icon.rb +1 -1
- data/lib/ios_build_kit/tasks/distribute.rb +62 -0
- data/lib/ios_build_kit/utils/console.rb +25 -4
- data/lib/ios_build_kit/version.rb +1 -1
- data/spec/distribute_spec.rb +35 -0
- data/spec/support/config_mocker.rb +19 -1
- data/spec/support/temp_dir.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67af387f3fbb62d5228be3ac777147714209f1b0
|
|
4
|
+
data.tar.gz: 07a8e8eb56cbaa9ede6ad61fbc3c7fab12437dad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb1562524fb63608bb53c248e3eb2eb10b40244368241201fb7d6d994ac2efb41aa98cb64320bf1518fcc415c3e9776bf5471f93e5183b252a667c6ecbb80446
|
|
7
|
+
data.tar.gz: ef5ed6d4e106d158dae7e4d200f6f5e8a8b2eb1d17fb9343ea603723777dbbfe1f22a7fcaf61dd1da9432f5093f8b67d026ed2115014a7aa06322fdbd649a416
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ios_build_kit (0.0.
|
|
4
|
+
ios_build_kit (0.0.5)
|
|
5
5
|
commander (~> 4.1)
|
|
6
6
|
json (~> 1.8)
|
|
7
7
|
nomad-cli (~> 0.0.2)
|
|
@@ -12,7 +12,7 @@ PATH
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: http://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
aws-sdk (1.34.
|
|
15
|
+
aws-sdk (1.34.1)
|
|
16
16
|
json (~> 1.4)
|
|
17
17
|
nokogiri (>= 1.4.4)
|
|
18
18
|
uuidtools (~> 2.1)
|
|
@@ -29,9 +29,9 @@ GEM
|
|
|
29
29
|
term-ansicolor (~> 1.0.7)
|
|
30
30
|
terminal-table (~> 1.4.5)
|
|
31
31
|
diff-lcs (1.2.5)
|
|
32
|
-
domain_name (0.5.
|
|
32
|
+
domain_name (0.5.16)
|
|
33
33
|
unf (>= 0.0.5, < 1.0.0)
|
|
34
|
-
dotenv (0.
|
|
34
|
+
dotenv (0.10.0)
|
|
35
35
|
dubai (0.0.5)
|
|
36
36
|
commander (~> 4.1)
|
|
37
37
|
json
|
|
@@ -61,7 +61,7 @@ GEM
|
|
|
61
61
|
net-http-persistent (2.9.4)
|
|
62
62
|
net-sftp (2.1.2)
|
|
63
63
|
net-ssh (>= 2.6.5)
|
|
64
|
-
net-ssh (2.
|
|
64
|
+
net-ssh (2.8.0)
|
|
65
65
|
nokogiri (1.5.11)
|
|
66
66
|
nomad-cli (0.0.2)
|
|
67
67
|
cupertino
|
data/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
===
|
|
1
|
+

|
|
3
2
|
|
|
4
3
|
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
4
|
|
|
@@ -13,8 +12,6 @@ Bundled build tasks include:
|
|
|
13
12
|
|
|
14
13
|
BuildKit is distributed as a [Ruby gem](https://rubygems.org/gems/ios_build_kit) with an executable that can be launched either in a continuous 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
14
|
|
|
16
|
-
*Note: 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).*
|
|
17
|
-
|
|
18
15
|
## Requirements
|
|
19
16
|
|
|
20
17
|
- **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.
|
|
@@ -24,7 +21,7 @@ BuildKit is distributed as a [Ruby gem](https://rubygems.org/gems/ios_build_kit)
|
|
|
24
21
|
|
|
25
22
|
## Installation
|
|
26
23
|
|
|
27
|
-
After the
|
|
24
|
+
After the requirements have been met, BuildKit can be installed with:
|
|
28
25
|
|
|
29
26
|
`gem install ios_build_kit`
|
|
30
27
|
|
|
@@ -228,7 +225,7 @@ Leaving the `:reports:` preference blank will skip report generation.
|
|
|
228
225
|
|
|
229
226
|
## Examples
|
|
230
227
|
|
|
231
|
-
An example workspace has been included in the repo if you want to try it out. You
|
|
228
|
+
An example workspace has been included in the repo if you want to try it out. You may need to change the paths in the `build_config.yml` configuration file first and run a `pod install`.
|
|
232
229
|
|
|
233
230
|
## Roadmap
|
|
234
231
|
|
|
@@ -243,12 +240,7 @@ Lots of plans for BuildKit:
|
|
|
243
240
|
|
|
244
241
|
## Contributing
|
|
245
242
|
|
|
246
|
-
All pull requests welcome! Please
|
|
247
|
-
|
|
248
|
-
### Contributors
|
|
249
|
-
|
|
250
|
-
- [@adamwaite](https://github.com/adamwaite/)
|
|
251
|
-
- [@garnett](https://github.com/garnett)
|
|
243
|
+
All pull requests welcome! Please ensure that all existing RSpec specs pass, and that any new features are covered with specs. Please keep the README up to date.
|
|
252
244
|
|
|
253
245
|
## Contact
|
|
254
246
|
|
|
@@ -21,10 +21,10 @@ module BuildKit
|
|
|
21
21
|
@tasks[:raw].each do |task_name, task_opts|
|
|
22
22
|
if task_opts[:run]
|
|
23
23
|
@tasks[:running] = task_name
|
|
24
|
-
BuildKit::Utilities::Console.
|
|
24
|
+
BuildKit::Utilities::Console.info_msg "Running Task: #{task_name}"
|
|
25
25
|
BuildKit::Tasks.send task_name, self, task_opts[:options]
|
|
26
26
|
else
|
|
27
|
-
BuildKit::Utilities::Console.
|
|
27
|
+
BuildKit::Utilities::Console.warning_msg "Skipping Task: #{task_name}"
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
all_tasks_completed
|
|
@@ -71,10 +71,10 @@ module BuildKit
|
|
|
71
71
|
build_report = BuildKit::Utilities::Reporter::create_report self
|
|
72
72
|
BuildKit::Utilities::Console.success_msg "BuildKit run report created at: #{build_report}"
|
|
73
73
|
else
|
|
74
|
-
|
|
74
|
+
BuildKit::Utilities::Console.warning_msg "Warning: Report not created. Invalid directory specified: #{@preferences.reports}"
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
|
-
BuildKit::Utilities::Console.success_msg "
|
|
77
|
+
BuildKit::Utilities::Console.success_msg "😃 BuildKit Run Completed! Ran #{@tasks[:completed].count} tasks successfully! 😃"
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
end
|
|
@@ -94,7 +94,7 @@ module BuildKit
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
def complete_task!
|
|
97
|
-
message = "Icons have been decorated with #{version_number_to_draw}. They are here: " + @decorated_icons.join("
|
|
97
|
+
message = "Icons have been decorated with #{version_number_to_draw}. They are here: \n" + @decorated_icons.join(",\n ")
|
|
98
98
|
@runner.task_completed! :decorate_icon, message, message
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# module BuildKit
|
|
2
|
+
|
|
3
|
+
# module Tasks
|
|
4
|
+
|
|
5
|
+
# def self.distribute runner, task_opts
|
|
6
|
+
# task = DistributeTask.new({ runner: runner, opts: task_opts })
|
|
7
|
+
# task.run!
|
|
8
|
+
# end
|
|
9
|
+
|
|
10
|
+
# private
|
|
11
|
+
|
|
12
|
+
# class DistributeTask < BuildKitTask
|
|
13
|
+
|
|
14
|
+
# attr_reader :output
|
|
15
|
+
|
|
16
|
+
# def run!
|
|
17
|
+
# case @task_options[:platform]
|
|
18
|
+
# when "hockeyapp"
|
|
19
|
+
# distribute_with_hockeyapp
|
|
20
|
+
# when "testflight"
|
|
21
|
+
# distribute_with_testflight
|
|
22
|
+
# else
|
|
23
|
+
# BuildKit::Utilities::Console.terminate_with_err "Invalid platform option for distribute task. Choose one of: hockeyapp, testflight"
|
|
24
|
+
# end
|
|
25
|
+
# complete_task!
|
|
26
|
+
# end
|
|
27
|
+
|
|
28
|
+
# private
|
|
29
|
+
|
|
30
|
+
# def assert_requirements
|
|
31
|
+
# BuildKit::Utilities::Assertions.assert_tasks_completed [:increment_version], @runner
|
|
32
|
+
# BuildKit::Utilities::Assertions.assert_tasks_completed [:create_ipa], @runner
|
|
33
|
+
# end
|
|
34
|
+
|
|
35
|
+
# def distribute_with_hockeyapp
|
|
36
|
+
# BuildKit::Utilities::Console.terminate_with_err "Invalid HockeyApp token" if @task_options[:token].nil?
|
|
37
|
+
# file_arg = "-f '#{@runner.store[:artefact_created]}'"
|
|
38
|
+
# token_arg = "--token '#{@task_options[:token]}'"
|
|
39
|
+
# message_arg = "-m '#{@runner.store[:new_version_number][:full]}'"
|
|
40
|
+
# @output = %x["ipa distribute:hockeyapp #{file_arg} #{token_arg} #{message_arg}"]
|
|
41
|
+
# puts @output
|
|
42
|
+
# end
|
|
43
|
+
|
|
44
|
+
# def distribute_with_testflight
|
|
45
|
+
# puts "TestFlight not yet supported"
|
|
46
|
+
# end
|
|
47
|
+
|
|
48
|
+
# def distribute_succeeded?
|
|
49
|
+
# @output.include? "EXIT CODE: 0"
|
|
50
|
+
# end
|
|
51
|
+
|
|
52
|
+
# def complete_task!
|
|
53
|
+
# @runner.store[:distribute_succeeded] = distribute_succeeded?
|
|
54
|
+
# message = (distribute_succeeded?) ? "distribute completed, distributed successfully" : "distribute task completed, but the distribution failed"
|
|
55
|
+
# @runner.task_completed! :distribute, message, @output
|
|
56
|
+
# end
|
|
57
|
+
|
|
58
|
+
# end
|
|
59
|
+
|
|
60
|
+
# end
|
|
61
|
+
|
|
62
|
+
# end
|
|
@@ -4,23 +4,44 @@ module BuildKit
|
|
|
4
4
|
|
|
5
5
|
module Console
|
|
6
6
|
|
|
7
|
+
require 'paint'
|
|
8
|
+
require 'paint/pa'
|
|
9
|
+
|
|
7
10
|
def self.header_msg h
|
|
8
|
-
|
|
11
|
+
pa "#{spaces}#{h}#{end_msg}", :black, :bold, :underline
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.info_msg m
|
|
15
|
+
pa "#{begin_msg}#{m}#{end_msg}", :blue
|
|
9
16
|
end
|
|
10
17
|
|
|
11
18
|
def self.warning_msg m
|
|
12
|
-
|
|
19
|
+
pa "#{begin_msg}#{m}#{end_msg}", :yellow
|
|
13
20
|
end
|
|
14
21
|
|
|
15
22
|
def self.success_msg m
|
|
16
|
-
|
|
23
|
+
pa "#{begin_msg}#{m}#{end_msg}", :green
|
|
17
24
|
end
|
|
18
25
|
|
|
19
26
|
def self.terminate_with_err err
|
|
20
|
-
|
|
27
|
+
pa "#{begin_msg}💣 Terminating with error: #{err} 💣#{end_msg}", :red
|
|
21
28
|
exit
|
|
22
29
|
end
|
|
23
30
|
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def self.begin_msg
|
|
34
|
+
"\n#{spaces} BK - "
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.end_msg
|
|
38
|
+
"\n"
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.spaces
|
|
42
|
+
" " * 3
|
|
43
|
+
end
|
|
44
|
+
|
|
24
45
|
end
|
|
25
46
|
|
|
26
47
|
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require_relative 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "distribute task" do
|
|
4
|
+
|
|
5
|
+
# describe "invalid config handling" do
|
|
6
|
+
# context "missing previous tasks" do
|
|
7
|
+
# context "increment_version" do
|
|
8
|
+
# let(:runner) { mock_runner vc.enable_xcode_build!.enable_create_ipa!.enable_distribute! }
|
|
9
|
+
# specify { expect { runner.run_tasks! }.to raise_error }
|
|
10
|
+
# end
|
|
11
|
+
# context "create_ipa" do
|
|
12
|
+
# let(:runner) { mock_runner vc.enable_increment_version!.enable_xcode_build!.enable_distribute! }
|
|
13
|
+
# specify { expect { runner.run_tasks! }.to raise_error }
|
|
14
|
+
# end
|
|
15
|
+
# end
|
|
16
|
+
# context "no platform" do
|
|
17
|
+
# let(:runner) { mock_runner vc.modify_task_option!(:distribute, :platform, "lolflight").enable_increment_version!.enable_xcode_build!.enable_create_ipa!.enable_distribute! }
|
|
18
|
+
# specify { expect { runner.run_tasks! }.to raise_error }
|
|
19
|
+
# end
|
|
20
|
+
# end
|
|
21
|
+
|
|
22
|
+
# describe "HockeyApp" do
|
|
23
|
+
# let(:runner) { mock_runner vc.enable_increment_version!.enable_xcode_build!.enable_create_ipa!.enable_distribute! }
|
|
24
|
+
# before { runner.run_tasks! }
|
|
25
|
+
# specify { runner.store[:distribute_succeeded].should be_true }
|
|
26
|
+
# end
|
|
27
|
+
|
|
28
|
+
# describe "task completion" do
|
|
29
|
+
# let(:runner) { mock_runner vc.enable_increment_version!.enable_xcode_build!.enable_create_ipa!.enable_distribute! }
|
|
30
|
+
# before { runner.run_tasks! }
|
|
31
|
+
# specify { runner.tasks[:completed].include?(:distribute).should be_true }
|
|
32
|
+
# specify { runner.outputs[:distribute].should_not be_nil }
|
|
33
|
+
# end
|
|
34
|
+
|
|
35
|
+
end
|
|
@@ -27,6 +27,11 @@ class Hash
|
|
|
27
27
|
self
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
def enable_distribute!
|
|
31
|
+
self[:tasks][:distribute][:run] = true
|
|
32
|
+
self
|
|
33
|
+
end
|
|
34
|
+
|
|
30
35
|
def modify_config! key, value
|
|
31
36
|
self[:configuration][key] = value
|
|
32
37
|
self
|
|
@@ -47,6 +52,11 @@ class Hash
|
|
|
47
52
|
self
|
|
48
53
|
end
|
|
49
54
|
|
|
55
|
+
def modify_task_option! task, key, value
|
|
56
|
+
self[:tasks][task][:options][key] = value
|
|
57
|
+
self
|
|
58
|
+
end
|
|
59
|
+
|
|
50
60
|
def modify_preference! key, value
|
|
51
61
|
self[:preferences][key] = value
|
|
52
62
|
self
|
|
@@ -92,7 +102,15 @@ def valid_config_file_data
|
|
|
92
102
|
create_ipa: {
|
|
93
103
|
run: false,
|
|
94
104
|
options: { log: false }
|
|
95
|
-
}
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
distribute: {
|
|
108
|
+
run: false,
|
|
109
|
+
options: {
|
|
110
|
+
platform: "hockeyapp",
|
|
111
|
+
token: "ab1234567891a123a1234567abcde12"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
96
114
|
|
|
97
115
|
},
|
|
98
116
|
|
data/spec/support/temp_dir.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ios_build_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Waite
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-03-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: commander
|
|
@@ -152,6 +152,7 @@ files:
|
|
|
152
152
|
- ./lib/ios_build_kit/task_runner.rb
|
|
153
153
|
- ./lib/ios_build_kit/tasks/create_ipa.rb
|
|
154
154
|
- ./lib/ios_build_kit/tasks/decorate_icon.rb
|
|
155
|
+
- ./lib/ios_build_kit/tasks/distribute.rb
|
|
155
156
|
- ./lib/ios_build_kit/tasks/increment_version.rb
|
|
156
157
|
- ./lib/ios_build_kit/tasks/run_tests.rb
|
|
157
158
|
- ./lib/ios_build_kit/tasks/xcode_build.rb
|
|
@@ -168,6 +169,7 @@ files:
|
|
|
168
169
|
- ./README.rdoc
|
|
169
170
|
- spec/create_ipa_spec.rb
|
|
170
171
|
- spec/decorate_icon_spec.rb
|
|
172
|
+
- spec/distribute_spec.rb
|
|
171
173
|
- spec/increment_version_spec.rb
|
|
172
174
|
- spec/reports_spec.rb
|
|
173
175
|
- spec/run_tests_spec.rb
|
|
@@ -203,6 +205,7 @@ summary: iOS Build Kit
|
|
|
203
205
|
test_files:
|
|
204
206
|
- spec/create_ipa_spec.rb
|
|
205
207
|
- spec/decorate_icon_spec.rb
|
|
208
|
+
- spec/distribute_spec.rb
|
|
206
209
|
- spec/increment_version_spec.rb
|
|
207
210
|
- spec/reports_spec.rb
|
|
208
211
|
- spec/run_tests_spec.rb
|