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 +4 -4
- data/.travis.yml +15 -3
- data/lib/teapot/command/build.rb +1 -1
- data/lib/teapot/command/create.rb +11 -3
- data/lib/teapot/command/fetch.rb +7 -2
- data/lib/teapot/project.rb +7 -1
- data/lib/teapot/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 291af29396fdc7dfed8f5648e602c102f9843b3b
|
4
|
+
data.tar.gz: ad1145a18295c802dccf49279a2d245825602a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d8c429b4e2f18459823eaff4bfdb11ff56dbea77b77f8479daa7d5589b7a193a68b6d765ad85d956f00cb9c1960058dd54d786a7a94452f3df533f3f39c730
|
7
|
+
data.tar.gz: 45118dcfdca9e6ac3a33b17e893e3cb3c3f6d30d073694bad250c0f2bd81cb7f4a24700d7d08430068b643b501abe66764503d5ea4315232027831ded53b18f4
|
data/.travis.yml
CHANGED
@@ -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
|
-
|
25
|
+
|
21
26
|
addons:
|
22
27
|
apt:
|
23
|
-
sources:
|
24
|
-
|
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
|
data/lib/teapot/command/build.rb
CHANGED
@@ -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
|
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
|
data/lib/teapot/command/fetch.rb
CHANGED
@@ -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
|
data/lib/teapot/project.rb
CHANGED
@@ -32,7 +32,13 @@ module Teapot
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def name
|
35
|
-
|
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
|
data/lib/teapot/version.rb
CHANGED
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
|
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-
|
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:
|
252
|
+
version: '0'
|
253
253
|
requirements: []
|
254
254
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.6.
|
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.
|