teapot 2.0.0.pre.rc3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c635c63b5b441f820b32101a3a3389eff2ef81e
4
- data.tar.gz: 859cf5553f07d00409b76bcbadf81dae90c9dcb9
3
+ metadata.gz: 291af29396fdc7dfed8f5648e602c102f9843b3b
4
+ data.tar.gz: ad1145a18295c802dccf49279a2d245825602a25
5
5
  SHA512:
6
- metadata.gz: cd2eef8a30f2efd10420a2c786beebc400623807d19d64465540c839f9b5fceeae59c7d0b42fa0d8924c01224de3def5ae0e4e64b5a66cdb4407db28fb85ed2d
7
- data.tar.gz: 4ca2c4261051631ae374f671346c683d59b79002064e5b9d88a3108633fc976ab00dc1ef837f2334df69dd8b360e3c8f72e53d0ae48b63b8e89dde7cec485c43
6
+ metadata.gz: 47d8c429b4e2f18459823eaff4bfdb11ff56dbea77b77f8479daa7d5589b7a193a68b6d765ad85d956f00cb9c1960058dd54d786a7a94452f3df533f3f39c730
7
+ data.tar.gz: 45118dcfdca9e6ac3a33b17e893e3cb3c3f6d30d073694bad250c0f2bd81cb7f4a24700d7d08430068b643b501abe66764503d5ea4315232027831ded53b18f4
@@ -1,11 +1,14 @@
1
+ # Setup the environment:
1
2
  language: ruby
2
3
  sudo: false
3
4
  dist: trusty
4
5
  cache: bundler
6
+
5
7
  before_install:
6
8
  # For testing purposes:
7
9
  - git config --global user.email "samuel@oriontransfer.net"
8
10
  - git config --global user.name "Samuel Williams"
11
+
9
12
  rvm:
10
13
  - 2.1
11
14
  - 2.2
@@ -13,12 +16,21 @@ rvm:
13
16
  - 2.4
14
17
  - jruby-head
15
18
  - ruby-head
19
+
20
+ # Setup the compilers:
16
21
  matrix:
17
22
  allow_failures:
18
23
  - rvm: ruby-head
19
24
  - rvm: jruby-head
20
- env: CC=clang-4.0 CXX=clang++-4.0
25
+
21
26
  addons:
22
27
  apt:
23
- sources: ["llvm-toolchain-trusty-4.0"]
24
- packages: ["clang-4.0"]
28
+ sources:
29
+ - ubuntu-toolchain-r-test
30
+ - llvm-toolchain-trusty-4.0
31
+ packages:
32
+ - clang-4.0
33
+ - libc++-dev
34
+ - libc++abi-dev
35
+ env:
36
+ - CC=clang-4.0 CXX=clang++-4.0
@@ -31,7 +31,7 @@ module Teapot
31
31
  self.description = "Build the specified target."
32
32
 
33
33
  options do
34
- option '-j/-l/--limit <n>', "Limit the build to <n> concurrent processes."
34
+ option '-j/-l/--limit <n>', "Limit the build to <n> concurrent processes.", type: Integer
35
35
  option '--only', "Only build direct dependencies."
36
36
  option '-c/--continuous', "Run the build graph continually (experimental)."
37
37
  end
@@ -34,6 +34,9 @@ module Teapot
34
34
  many :packages, "Any additional packages you'd like to include in the project."
35
35
 
36
36
  def invoke(parent)
37
+ raise ArgumentError, "project_name is required" unless @project_name
38
+ raise ArgumentError, "source is required" unless @source
39
+
37
40
  logger = parent.logger
38
41
 
39
42
  nested = parent['--root', parent.options[:root] || project_name.gsub(/\s+/, '-').downcase]
@@ -101,13 +104,18 @@ module Teapot
101
104
  output.puts "\# Build Targets", ''
102
105
 
103
106
  output.puts "\# Configurations", ''
104
-
105
- output.puts "define_configuration #{name.target.dump} do |configuration|"
106
- output.puts "\tconfiguration[:source] = #{source.dump}", ''
107
+
108
+ output.puts "define_configuration 'development' do |configuration|"
109
+ output.puts "\tconfiguration[:source] = #{source.dump}"
110
+ output.puts "\tconfiguration.import #{name.target.dump}"
107
111
  packages.each do |name|
108
112
  output.puts "\tconfiguration.require #{name.dump}"
109
113
  end
110
114
  output.puts "end", ''
115
+
116
+ output.puts "define_configuration #{name.target.dump} do |configuration|"
117
+ output.puts "\tconfiguration.public!"
118
+ output.puts "end"
111
119
  end
112
120
  end
113
121
  end
@@ -117,6 +117,11 @@ module Teapot
117
117
  destination_path.make_symlink(local_path)
118
118
  end
119
119
  end
120
+
121
+ def credentials(url, username, types)
122
+ # We should prompt for username/password if required...
123
+ return Rugged::Credentials::SshKeyFromAgent.new(username: username)
124
+ end
120
125
 
121
126
  def clone_or_pull_package(context, configuration, package, package_lock, logger)
122
127
  logger.info "Processing #{package}...".color(:cyan)
@@ -149,7 +154,7 @@ module Teapot
149
154
  raise FetchError.new(package, "Uncommited local modifications")
150
155
  end
151
156
 
152
- repository.fetch('origin')
157
+ repository.fetch('origin', credentials: self.method(:credentials))
153
158
  repository.checkout(branch_name)
154
159
 
155
160
  # Essentially implement git pull:
@@ -170,7 +175,7 @@ module Teapot
170
175
  external_url = package.external_url(context.root)
171
176
 
172
177
  # Clone the repository with the specified branch:
173
- repository = Rugged::Repository.clone_at(external_url.to_s, destination_path.to_s, checkout_branch: branch_name)
178
+ repository = Rugged::Repository.clone_at(external_url.to_s, destination_path.to_s, checkout_branch: branch_name, credentials: self.method(:credentials))
174
179
 
175
180
  # Reset it to the requested commit if required:
176
181
  repository.reset(commit_id, :hard) if commit_id
@@ -32,7 +32,13 @@ module Teapot
32
32
  end
33
33
 
34
34
  def name
35
- Build::Name.from_target(@name)
35
+ if @title
36
+ # Prefer title, it retains case.
37
+ Build::Name.new(@title)
38
+ else
39
+ # Otherwise, if we don't have title, use the target name.
40
+ Build::Name.from_target(@name)
41
+ end
36
42
  end
37
43
 
38
44
  def freeze
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Teapot
22
- VERSION = "2.0.0-rc3"
22
+ VERSION = "2.0.0"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teapot
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.rc3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-09 00:00:00.000000000 Z
11
+ date: 2017-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -247,12 +247,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
247
  version: 2.1.0
248
248
  required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  requirements:
250
- - - ">"
250
+ - - ">="
251
251
  - !ruby/object:Gem::Version
252
- version: 1.3.1
252
+ version: '0'
253
253
  requirements: []
254
254
  rubyforge_project:
255
- rubygems_version: 2.6.12
255
+ rubygems_version: 2.6.10
256
256
  signing_key:
257
257
  specification_version: 4
258
258
  summary: Teapot is a tool for managing complex cross-platform builds.