octobuild 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: cd8ef9698e2b19606cc7611dc362a7e8fd9c993c
4
+ data.tar.gz: d9d71a70944878bcacd82c221e090645e827fac4
5
+ SHA512:
6
+ metadata.gz: 10b72c07085a3737dfd431a1059b7ce4a17ca3ad5a64a9446ff12febc9639f97984bdcd3ebb6871a238b8db13c0ec539be1bb4653635694fe068bb17b58fa4a8
7
+ data.tar.gz: dfbd0d64bc6c6455b74ed3dddd6f59c16410454671b63b2b7783bf8e5566f8d2edf21dab948370fec783e98b025b81d495c5c725082fc4848e4a7c8430eba7be
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ Style/Documentation:
2
+ Enabled: false
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Boris Bügling
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # Octobuild
2
+
3
+ Execute your build and tests with a list of Xcode versions to ensure maximum compatibility.
4
+
5
+ ## Usage
6
+
7
+ Specify a space-separated list of versions and the command to run:
8
+
9
+ ```bash
10
+ $ VERSIONS='6.2 6.3.2 6.4' octobuild swift -version
11
+ Building with Xcode 6.2...
12
+ Swift version 1.1 (swift-600.0.57.4)
13
+ Target: x86_64-apple-darwin14.4.0
14
+ Building with Xcode 6.3.2...
15
+ Apple Swift version 1.2 (swiftlang-602.0.53.1 clang-602.0.53)
16
+ Target: x86_64-apple-darwin14.4.0
17
+ Building with Xcode 6.4...
18
+ Apple Swift version 1.2 (swiftlang-602.0.49.3 clang-clang-602.0.49)
19
+ Target: x86_64-apple-darwin14.4.0
20
+ ```
21
+
22
+ Octobuild will execute the given command for each of the specified Xcode versions, installing
23
+ them in the process, if needed.
24
+
25
+ ## Installation
26
+
27
+ Install it yourself as:
28
+
29
+ $ gem install octobuild
30
+
31
+ ## Contributing
32
+
33
+ 1. Fork it ( https://github.com/neonichu/octobuild/fork )
34
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
35
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
36
+ 4. Push to the branch (`git push origin my-new-feature`)
37
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
data/bin/octobuild ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if $PROGRAM_NAME == __FILE__
4
+ ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
5
+ require 'rubygems'
6
+ require 'bundler/setup'
7
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
8
+ end
9
+
10
+ require 'octobuild'
11
+
12
+ Octobuild::Builder.new.build
@@ -0,0 +1,3 @@
1
+ module Octobuild
2
+ VERSION = '0.0.1'
3
+ end
data/lib/octobuild.rb ADDED
@@ -0,0 +1,39 @@
1
+ require 'octobuild/version'
2
+ require 'xcode/install'
3
+
4
+ module Octobuild
5
+ class Builder
6
+ def initialize
7
+ @installer = XcodeInstall::Installer.new
8
+ end
9
+
10
+ def build(versions = nil)
11
+ versions = requested_versions if versions.nil?
12
+ versions.each do |version|
13
+ puts "Building with Xcode #{version}..."
14
+ xcode = @installer.installed_versions.find { |x| x.version == version }
15
+
16
+ if xcode.nil?
17
+ puts 'Installing Xcode...'
18
+ @installer.install_version(version, false)
19
+ end
20
+
21
+ system(command(xcode))
22
+ end
23
+ end
24
+
25
+ private
26
+
27
+ def command(xcode)
28
+ "DEVELOPER_DIR='#{xcode.path}' #{ARGV.join(' ')}"
29
+ end
30
+
31
+ def requested_versions
32
+ if ENV['VERSIONS'].nil?
33
+ @installer.installed_versions.map(&:version)
34
+ else
35
+ ENV['VERSIONS'].split(' ')
36
+ end
37
+ end
38
+ end
39
+ end
data/octobuild.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'octobuild/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'octobuild'
8
+ spec.version = Octobuild::VERSION
9
+ spec.authors = ['Boris Bügling']
10
+ spec.email = ['boris@buegling.com']
11
+ spec.summary = <<-SUMMARY
12
+ Execute your build and tests with a list of Xcode versions to
13
+ ensure maximum compatibility.
14
+ SUMMARY
15
+ spec.homepage = 'https://github.com/neonichu/octobuild/'
16
+ spec.license = 'MIT'
17
+
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.7'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+
26
+ spec.add_dependency 'xcode-install', '~> 0.3.0'
27
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: octobuild
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Boris Bügling
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: xcode-install
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.3.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.3.0
55
+ description:
56
+ email:
57
+ - boris@buegling.com
58
+ executables:
59
+ - octobuild
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - .gitignore
64
+ - .rubocop.yml
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - bin/octobuild
70
+ - lib/octobuild.rb
71
+ - lib/octobuild/version.rb
72
+ - octobuild.gemspec
73
+ homepage: https://github.com/neonichu/octobuild/
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.0.14
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Execute your build and tests with a list of Xcode versions to ensure maximum
97
+ compatibility.
98
+ test_files: []
99
+ has_rdoc: