autobuild 1.10.0.b3 → 1.10.0.b4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -1
- data/lib/autobuild.rb +6 -0
- data/lib/autobuild/config.rb +8 -20
- data/lib/autobuild/import/archive.rb +4 -7
- data/lib/autobuild/import/git.rb +13 -1
- data/lib/autobuild/version.rb +1 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 337600547fed308e00ef0dbcfbedcdd02664d3d3
|
4
|
+
data.tar.gz: 5d051d09d63bcf0e82463b099d4a9e690893a516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b996cbdfa5a35e5b23da4ded4e8da3258ebb9f06fadfd1ec0472b0958777d76771eebb7708c2959ca8d532b10485192d8f54de1071a205332a8d25fc964075d6
|
7
|
+
data.tar.gz: 54336977873b4150cea50d3356295b491ae154769c22cdf8660c2def2b9ca50a70709fa6291cf0898bbca475d450d47ad2843b6816476a2807868744150904d9
|
data/Rakefile
CHANGED
data/lib/autobuild.rb
CHANGED
@@ -18,6 +18,12 @@ require 'shellwords'
|
|
18
18
|
require 'find'
|
19
19
|
require 'rake/tasklib'
|
20
20
|
require 'fileutils'
|
21
|
+
require 'optparse'
|
22
|
+
require 'rake'
|
23
|
+
require 'singleton'
|
24
|
+
require 'pastel'
|
25
|
+
require 'tty'
|
26
|
+
require 'autobuild/tools'
|
21
27
|
|
22
28
|
require 'autobuild/version'
|
23
29
|
require 'autobuild/environment'
|
data/lib/autobuild/config.rb
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
require 'rake'
|
3
|
-
require 'singleton'
|
4
|
-
require 'highline'
|
5
|
-
require 'autobuild/tools'
|
6
|
-
|
7
1
|
# Evaluates +script+ in autobuild context
|
8
2
|
def Autobuild(&script)
|
9
3
|
Autobuild.send(:module_eval, &script)
|
@@ -82,9 +76,6 @@ module Autobuild
|
|
82
76
|
# The directory in which logs are saved. Defaults to PREFIX/log.
|
83
77
|
attr_writer :logdir
|
84
78
|
|
85
|
-
# A HighLine object that allows to colorize the output
|
86
|
-
attr_reader :console
|
87
|
-
|
88
79
|
# True if we build and if the build is applied on all packages
|
89
80
|
def full_build?
|
90
81
|
do_build && !only_doc && packages.empty?
|
@@ -94,22 +85,19 @@ module Autobuild
|
|
94
85
|
register_utility_class 'doc', Utility, disabled_by_default: false
|
95
86
|
register_utility_class 'test', Utility, disabled_by_default: true
|
96
87
|
|
97
|
-
@
|
98
|
-
|
88
|
+
@colorizer = Pastel.new
|
99
89
|
class << self
|
100
|
-
|
90
|
+
def color=(flag)
|
91
|
+
@colorizer = Pastel.new(enabled: flag)
|
92
|
+
end
|
93
|
+
|
101
94
|
def color?
|
102
|
-
|
95
|
+
@colorizer.enabled?
|
103
96
|
end
|
104
97
|
end
|
105
|
-
@color = true
|
106
98
|
|
107
|
-
def self.color(*
|
108
|
-
|
109
|
-
console.color(*args)
|
110
|
-
else
|
111
|
-
args.first
|
112
|
-
end
|
99
|
+
def self.color(message, *style)
|
100
|
+
@colorizer.decorate(message, *style)
|
113
101
|
end
|
114
102
|
|
115
103
|
DEFAULT_OPTIONS = { :nice => nil,
|
@@ -372,17 +372,14 @@ module Autobuild
|
|
372
372
|
package.progress_done
|
373
373
|
package.message "The archive #{@url.to_s} is different from the one currently checked out at #{package.srcdir}", :bold
|
374
374
|
package.message "I will have to delete the current folder to go on with the update"
|
375
|
-
response =
|
376
|
-
|
377
|
-
|
378
|
-
q.default = 'yes'
|
379
|
-
q.case = :downcase
|
380
|
-
end
|
375
|
+
response = TTY::Shell.new.ask " Continue (yes or no) ? If no, this update will be ignored, which can lead to build problems." do
|
376
|
+
modify :downcase
|
377
|
+
end.read_string
|
381
378
|
else
|
382
379
|
raise Autobuild::InteractionRequired, "importing #{package.name} would have required user interaction and allow_interactive is false"
|
383
380
|
end
|
384
381
|
|
385
|
-
if response ==
|
382
|
+
if response == 'no' || response == 'n'
|
386
383
|
package.message "not updating #{package.srcdir}"
|
387
384
|
package.progress_done
|
388
385
|
return
|
data/lib/autobuild/import/git.rb
CHANGED
@@ -352,9 +352,21 @@ module Autobuild
|
|
352
352
|
end
|
353
353
|
end
|
354
354
|
|
355
|
+
# Enumerates the remotes that this importer would set up on the
|
356
|
+
# repository
|
357
|
+
#
|
358
|
+
# @yieldparam [String] remote_name the remote name
|
359
|
+
# @yieldparam [String] url the remote URL
|
360
|
+
# @yieldparam [String] push_to the remote push-to URL
|
361
|
+
def each_configured_remote
|
362
|
+
([['autobuild', repository, push_to]] + additional_remotes).each do |args|
|
363
|
+
yield(args[0], args[1], args[2] || args[1])
|
364
|
+
end
|
365
|
+
end
|
366
|
+
|
355
367
|
# Updates the git repository's configuration for the target remote
|
356
368
|
def update_remotes_configuration(package)
|
357
|
-
|
369
|
+
each_configured_remote do |*args|
|
358
370
|
setup_remote(package, *args)
|
359
371
|
end
|
360
372
|
|
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.0.
|
4
|
+
version: 1.10.0.b4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -39,19 +39,33 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: pastel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.4.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.4.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: tty
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.2.0
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rdoc
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|