build-tool 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +2 -1
- data/History.txt +9 -0
- data/Manifest.txt +1 -0
- data/README.txt +5 -2
- data/bin/build-tool-1.9 +21 -0
- data/lib/build-tool.rb +1 -1
- data/lib/build-tool/build-system/base.rb +2 -2
- data/lib/build-tool/build-system/custom.rb +6 -2
- data/lib/build-tool/cfg/node.rb +1 -0
- data/lib/build-tool/cfg/parser.rb +3 -3
- data/lib/build-tool/cfg/parser.y +1 -1
- data/lib/build-tool/cfg/visitor.rb +26 -22
- data/lib/build-tool/command_actions.rb +12 -2
- data/lib/build-tool/commands/history.rb +8 -3
- data/lib/build-tool/configuration.rb +1 -1
- data/lib/build-tool/environment.rb +6 -7
- data/lib/build-tool/history.rb +8 -3
- data/lib/build-tool/module.rb +10 -9
- data/lib/build-tool/vcs/archive.rb +5 -0
- data/lib/build-tool/vcs/base.rb +6 -2
- data/lib/build-tool/vcs/git-svn.rb +8 -2
- data/lib/build-tool/vcs/git.rb +8 -3
- data/lib/build-tool/vcs/mercurial.rb +6 -0
- data/lib/build-tool/vcs/svn.rb +5 -0
- data/lib/mj/tools/subprocess.rb +13 -3
- metadata +6 -4
- metadata.gz.sig +2 -1
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1>�2��,H�|Ѳ��-�w�m,[B��$ʺBmi���HG�x�-_�Մr�l�oƵ�
|
2
|
+
N8"�,h(M3܅^8�!w�2��it�^�j��T���_��v;�8�����f�܉��-p��?o?+��؍F�$n�N@u�5�Zk�>I�������.B^��E,9����������%�a+�ւ�,��������F1y��^j� ��3nh�#kD�Q �.��u�z��>�;���W4�-
|
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 0.4.1
|
2
|
+
- Enhancements
|
3
|
+
- Colorize the output of the history command.
|
4
|
+
- When fetching from remote specify the --prune option.
|
5
|
+
- Improve some error messages.
|
6
|
+
- Bugfix
|
7
|
+
- Some ruby 1.9 compatibility fixes. No idea if it really works with 1.99.
|
8
|
+
- Do not register remotes as repository declarations.
|
9
|
+
|
1
10
|
== 0.4.0
|
2
11
|
- Feature
|
3
12
|
- Show a ansi terminal code based progressbar when compiling or installing in non verbose mode.
|
data/Manifest.txt
CHANGED
data/README.txt
CHANGED
@@ -50,7 +50,10 @@ http://michael-jansen.biz/build-tool
|
|
50
50
|
|
51
51
|
== REQUIREMENTS:
|
52
52
|
|
53
|
-
* logging
|
53
|
+
* logging >= 1.2.2
|
54
|
+
* sequel >= 3.8.0
|
55
|
+
* sqlite3-ruby >= 1.2
|
56
|
+
* ansi >= 1.2
|
54
57
|
|
55
58
|
== INSTALL:
|
56
59
|
|
@@ -60,5 +63,5 @@ http://michael-jansen.biz/build-tool
|
|
60
63
|
|
61
64
|
(The GPL LICENSE)
|
62
65
|
|
63
|
-
Copyright (c) 2009 Michael Jansen
|
66
|
+
Copyright (c) 2009-2010 Michael Jansen
|
64
67
|
|
data/bin/build-tool-1.9
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby1.9
|
2
|
+
#
|
3
|
+
# Created by Michael Jansen on 2009-8-31.
|
4
|
+
# Copyright (c) 2009. All rights reserved.
|
5
|
+
|
6
|
+
require 'pathname'
|
7
|
+
require 'rubygems'
|
8
|
+
|
9
|
+
# libs relative to the link target
|
10
|
+
if File.symlink?(__FILE__)
|
11
|
+
root_directory = File.dirname(File.readlink(__FILE__))
|
12
|
+
else
|
13
|
+
root_directory = File.dirname(__FILE__)
|
14
|
+
end
|
15
|
+
|
16
|
+
root_directory = Pathname.new( root_directory ).join( '..' )
|
17
|
+
require File.expand_path( root_directory + "lib/build-tool")
|
18
|
+
|
19
|
+
require 'build-tool/application'
|
20
|
+
|
21
|
+
exit BuildTool.main( $0, ARGV, root_directory );
|
data/lib/build-tool.rb
CHANGED
@@ -89,7 +89,7 @@ def option_names
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def to_s
|
92
|
-
return "#{self.
|
92
|
+
return "#{self.module.name} #{self.name} #{@options.keys.join( ', ')}"
|
93
93
|
end
|
94
94
|
|
95
95
|
def active?
|
@@ -121,7 +121,7 @@ def []( var )
|
|
121
121
|
end
|
122
122
|
return parentval if !parentval.nil?
|
123
123
|
return "" if @supported_options.include?( var )
|
124
|
-
raise UnknownOptionError, "#{self} Option #{var} is unknown for build-system #{name}"
|
124
|
+
raise UnknownOptionError, "[#{self.module.name}] Option #{var} is unknown for build-system #{name}"
|
125
125
|
end
|
126
126
|
|
127
127
|
def []=( var, value )
|
@@ -53,12 +53,16 @@ def execute( script )
|
|
53
53
|
if !path.executable?
|
54
54
|
raise CustomError, "Script %s not executable!" % path.to_s
|
55
55
|
end
|
56
|
-
|
57
|
-
|
56
|
+
command = "%s %s" % [ path.to_s, source_directory ]
|
57
|
+
rc = self.module.environment.execute(
|
58
|
+
command,
|
58
59
|
build_directory,
|
59
60
|
{
|
60
61
|
'INSTALL_PREFIX' => install_prefix.to_s,
|
61
62
|
}.merge(Hash[option_hash]))
|
63
|
+
if rc != 0
|
64
|
+
raise CustomError, "#{command.to_s} failed with error code #{rc}";
|
65
|
+
end
|
62
66
|
end
|
63
67
|
|
64
68
|
def install( fast )
|
data/lib/build-tool/cfg/node.rb
CHANGED
@@ -22,7 +22,7 @@ module Cfg
|
|
22
22
|
|
23
23
|
class Parser < BuildTool::Cfg::Lexer
|
24
24
|
|
25
|
-
module_eval <<'..end lib/build-tool/cfg/parser.y modeval..
|
25
|
+
module_eval <<'..end lib/build-tool/cfg/parser.y modeval..id8d638bce17', 'lib/build-tool/cfg/parser.y', 344
|
26
26
|
#
|
27
27
|
### INNER
|
28
28
|
#
|
@@ -40,7 +40,7 @@ def parse_string( string, file = "<string>" )
|
|
40
40
|
return configuration
|
41
41
|
end
|
42
42
|
|
43
|
-
..end lib/build-tool/cfg/parser.y modeval..
|
43
|
+
..end lib/build-tool/cfg/parser.y modeval..id8d638bce17
|
44
44
|
|
45
45
|
##### racc 1.4.5 generates ###
|
46
46
|
|
@@ -797,7 +797,7 @@ def _reduce_51( val, _values, result )
|
|
797
797
|
|
798
798
|
module_eval <<'.,.,', 'lib/build-tool/cfg/parser.y', 193
|
799
799
|
def _reduce_52( val, _values, result )
|
800
|
-
result =
|
800
|
+
result = RemoteDeclarationNode.new( val[1..-1]);
|
801
801
|
result
|
802
802
|
end
|
803
803
|
.,.,
|
data/lib/build-tool/cfg/parser.y
CHANGED
@@ -309,7 +309,7 @@ def visit_GitDeclarationNode( node )
|
|
309
309
|
return @vcs
|
310
310
|
end
|
311
311
|
|
312
|
-
def
|
312
|
+
def visit_RemoteDeclarationNode( node )
|
313
313
|
visitor = RepositoryDeclarationNodeVisitor.new( configuration )
|
314
314
|
repo = node.accept(visitor)
|
315
315
|
@vcs.remote[repo.name] = repo
|
@@ -358,11 +358,10 @@ def visit_ApplyPatchesNode( node )
|
|
358
358
|
end
|
359
359
|
|
360
360
|
def visit_ArchiveDeclarationNode( node )
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
end
|
361
|
+
vcs = BuildTool::VCS::ArchiveConfiguration.new
|
362
|
+
# if @module.vcs_configuration and @module.vcs_configuration.name == "archive"
|
363
|
+
# vcs.copy_configuration( @module.vcs_configuration )
|
364
|
+
# end
|
366
365
|
@module.vcs_configuration = vcs
|
367
366
|
visitor = ArchiveDeclarationNodeVisitor.new( configuration, vcs )
|
368
367
|
node.accept( visitor )
|
@@ -406,11 +405,10 @@ def visit_EnvironmentDeclarationNode( node )
|
|
406
405
|
end
|
407
406
|
|
408
407
|
def visit_GitDeclarationNode( node )
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
end
|
408
|
+
vcs = BuildTool::VCS::GitConfiguration.new
|
409
|
+
# if @module.vcs_configuration and @module.vcs_configuration.name == "git"
|
410
|
+
# vcs.copy_configuration( @module.vcs_configuration )
|
411
|
+
# end
|
414
412
|
@module.vcs_configuration = vcs
|
415
413
|
begin
|
416
414
|
visitor = GitDeclarationNodeVisitor.new( configuration, vcs )
|
@@ -421,11 +419,10 @@ def visit_GitDeclarationNode( node )
|
|
421
419
|
end
|
422
420
|
|
423
421
|
def visit_GitSvnDeclarationNode( node )
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
end
|
422
|
+
vcs = BuildTool::VCS::GitSvnConfiguration.new
|
423
|
+
# if @module.vcs_configuration and @module.vcs_configuration.name == "gitsvn"
|
424
|
+
# vcs.copy_configuration( @module.vcs_configuration )
|
425
|
+
# end
|
429
426
|
@module.vcs_configuration = vcs
|
430
427
|
visitor = GitSvnDeclarationNodeVisitor.new( configuration, vcs )
|
431
428
|
node.accept( visitor )
|
@@ -500,11 +497,10 @@ def visit_ShortDescriptionNode( node )
|
|
500
497
|
end
|
501
498
|
|
502
499
|
def visit_SvnDeclarationNode( node )
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
end
|
500
|
+
vcs = BuildTool::VCS::SvnConfiguration.new
|
501
|
+
# if @module.vcs_configuration and @module.vcs_configuration.name == "svn"
|
502
|
+
# vcs.copy_configuration( @module.vcs_configuration )
|
503
|
+
# end
|
508
504
|
@module.vcs_configuration = vcs
|
509
505
|
visitor = SvnDeclarationNodeVisitor.new( configuration, vcs )
|
510
506
|
node.accept( visitor )
|
@@ -553,6 +549,14 @@ def visit_RepositoryDeclarationNode( node )
|
|
553
549
|
return @repository
|
554
550
|
end
|
555
551
|
|
552
|
+
def visit_RemoteDeclarationNode( node )
|
553
|
+
name = node.values[0]
|
554
|
+
@repository = BuildTool::Repository.new( name )
|
555
|
+
stmts = node.values[1]
|
556
|
+
visit_nodes( stmts )
|
557
|
+
return @repository
|
558
|
+
end
|
559
|
+
|
556
560
|
def visit_RepositoryPathNode( node )
|
557
561
|
@repository.path = node.value
|
558
562
|
end
|
@@ -646,7 +650,7 @@ def visit_SshKeyFileNode( node )
|
|
646
650
|
|
647
651
|
end
|
648
652
|
|
649
|
-
class SvnDeclarationNodeVisitor <
|
653
|
+
class SvnDeclarationNodeVisitor < ListVisitor
|
650
654
|
|
651
655
|
def initialize( configuration, vcs )
|
652
656
|
super( configuration, vcs )
|
@@ -65,6 +65,7 @@ class Base
|
|
65
65
|
|
66
66
|
def initialize( command, prio, type, mod )
|
67
67
|
@command = command
|
68
|
+
@level = nil
|
68
69
|
@logdir = command.log_directory.join( mod.name )
|
69
70
|
@type = type
|
70
71
|
@prio = prio
|
@@ -77,9 +78,18 @@ def do
|
|
77
78
|
# Make sure the directory for this module exists
|
78
79
|
FileUtils.mkdir_p( @logdir ) if ! $noop
|
79
80
|
|
81
|
+
oldlevel = Logging.appenders['stdout'].level
|
82
|
+
if @level
|
83
|
+
Logging.appenders['stdout'].level = @level
|
84
|
+
end
|
85
|
+
|
80
86
|
# Open the logfile and then execute the command
|
81
|
-
|
82
|
-
|
87
|
+
begin
|
88
|
+
while_logging do
|
89
|
+
execute
|
90
|
+
end
|
91
|
+
ensure
|
92
|
+
Logging.appenders['stdout'].level = oldlevel
|
83
93
|
end
|
84
94
|
end
|
85
95
|
|
@@ -1,5 +1,8 @@
|
|
1
1
|
require 'build-tool/commands'
|
2
2
|
|
3
|
+
require 'ansi'
|
4
|
+
|
5
|
+
|
3
6
|
module BuildTool; module Commands;
|
4
7
|
|
5
8
|
#
|
@@ -7,6 +10,8 @@ module BuildTool; module Commands;
|
|
7
10
|
#
|
8
11
|
class History < Standard
|
9
12
|
|
13
|
+
include ANSI::Code
|
14
|
+
|
10
15
|
name "history"
|
11
16
|
description "show command history"
|
12
17
|
long_description [ "Query the command history",
|
@@ -57,7 +62,7 @@ def do_execute( args )
|
|
57
62
|
|
58
63
|
def show_command( cmd )
|
59
64
|
if @long
|
60
|
-
say " %04d %s
|
65
|
+
say " %04d %s # %s [%s]" % [ cmd.id, cmd.started_at.strftime("%x %X"), cmd.command, cmd.state_str ]
|
61
66
|
else
|
62
67
|
say " %04d %s [%s]" % [ cmd.id, cmd.command, cmd.state_str ]
|
63
68
|
end
|
@@ -84,7 +89,7 @@ def show_module_history( modname )
|
|
84
89
|
last_module=""
|
85
90
|
cmd.module_logs_dataset.filter( :module => modname ).each do |e|
|
86
91
|
if e.module != last_module
|
87
|
-
say "\t#{e.module}"
|
92
|
+
say blue { "\t#{e.module}" }
|
88
93
|
last_module = e.module
|
89
94
|
end
|
90
95
|
say "\t\t %s %s (%s) [%s]" % [ e.duration, e.event, e.logfile, e.state_str ]
|
@@ -109,7 +114,7 @@ def show_detailed_command_history( id )
|
|
109
114
|
last_module=""
|
110
115
|
cmd.module_logs.each do |e|
|
111
116
|
if e.module != last_module
|
112
|
-
say "\t#{e.module}"
|
117
|
+
say blue { "\t#{e.module}" }
|
113
118
|
last_module = e.module
|
114
119
|
end
|
115
120
|
say "\t\t %s %s (%s) [%s]" % [ e.duration, e.event, e.logfile, e.state_str ]
|
@@ -133,7 +133,7 @@ def create_build_system( name, parent = nil, *args )
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def build_system_adjust( name, parent = nil, *args )
|
136
|
-
bs = create_build_system( name )
|
136
|
+
bs = create_build_system( name, parent )
|
137
137
|
bs.defaults = build_system_defaults( name )
|
138
138
|
return bs
|
139
139
|
end
|
@@ -45,14 +45,13 @@ def append( name, value )
|
|
45
45
|
end
|
46
46
|
|
47
47
|
# Execute command in a shell with the environment set.
|
48
|
-
def execute( command, wd = nil,
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
if rc != 0
|
53
|
-
raise StandardError, "#{command.to_s} failed with error code #{rc}";
|
48
|
+
def execute( command, wd = nil, envadd = nil )
|
49
|
+
env = Hash.new
|
50
|
+
for var in vars do
|
51
|
+
env[var] = self[var]
|
54
52
|
end
|
55
|
-
|
53
|
+
env.merge!( envadd ) if envadd
|
54
|
+
return self.class.execute( command.to_s, wd, env )
|
56
55
|
end
|
57
56
|
|
58
57
|
# Prepend +value+ to variable +name+. A ':' is added when necessary.
|
data/lib/build-tool/history.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'sequel'
|
2
|
+
require 'ansi'
|
2
3
|
|
3
4
|
module BuildTool
|
4
5
|
|
@@ -9,6 +10,10 @@ module History
|
|
9
10
|
|
10
11
|
module StateHelper
|
11
12
|
|
13
|
+
# ATTENTION
|
14
|
+
#
|
15
|
+
# Ansi::Code and Sequel don't like each other. Do not include Ansi::Code here.
|
16
|
+
|
12
17
|
# Needed for both Module and Command History
|
13
18
|
STARTED = 0
|
14
19
|
CANCELED_BY_USER = 1
|
@@ -20,11 +25,11 @@ def state_str
|
|
20
25
|
when STARTED
|
21
26
|
"STARTED"
|
22
27
|
when CANCELED_BY_USER
|
23
|
-
"CANCELED"
|
28
|
+
ANSI::Code.red { "CANCELED" }
|
24
29
|
when FINISHED_SUCCESSFUL
|
25
|
-
"SUCCESS"
|
30
|
+
ANSI::Code.green { "SUCCESS" }
|
26
31
|
when FINISHED_WITH_ERRORS
|
27
|
-
"ERRORS"
|
32
|
+
ANSI::Code.red { "ERRORS" }
|
28
33
|
else
|
29
34
|
"#{self.state.to_s}?"
|
30
35
|
end
|
data/lib/build-tool/module.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
require 'ftools'
|
2
1
|
require 'mj/tools/ssh'
|
3
2
|
|
3
|
+
require 'fileutils'
|
4
|
+
|
4
5
|
module BuildTool
|
5
6
|
|
6
7
|
#
|
@@ -233,18 +234,18 @@ def vcs
|
|
233
234
|
attr_writer :vcs_configuration
|
234
235
|
def vcs_configuration
|
235
236
|
return @vcs_configuration if @vcs_configuration
|
236
|
-
|
237
|
+
if @parent && @parent.vcs_configuration
|
238
|
+
# puts "copying vcs for #{name} from #{@parent.name}"
|
239
|
+
vc = @parent.vcs_configuration.class.new
|
240
|
+
vc.copy_configuration( @parent.vcs_configuration )
|
241
|
+
@vcs_configuration = vc
|
242
|
+
return vc
|
243
|
+
end
|
237
244
|
nil
|
238
245
|
end
|
239
246
|
|
240
247
|
def vcs_configuration_required
|
241
|
-
|
242
|
-
vc = @vcs_configuration
|
243
|
-
elsif @parent
|
244
|
-
vc = @parent.vcs_configuration
|
245
|
-
else
|
246
|
-
vc = nil
|
247
|
-
end
|
248
|
+
vc = vcs_configuration
|
248
249
|
if vc.nil?
|
249
250
|
raise ConfigurationError, "No version control system configure for module #{name}."
|
250
251
|
end
|
@@ -13,10 +13,15 @@ def name
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def vcs( mod )
|
16
|
+
raise StandardError if @module and ! mod.equal?( @module )
|
16
17
|
@module = mod
|
17
18
|
Archive.new( self )
|
18
19
|
end
|
19
20
|
|
21
|
+
def copy_configuration( other )
|
22
|
+
super
|
23
|
+
end
|
24
|
+
|
20
25
|
end # class ArchiveConfiguration
|
21
26
|
|
22
27
|
class Archive < Base
|
data/lib/build-tool/vcs/base.rb
CHANGED
@@ -8,8 +8,8 @@ class BaseConfiguration
|
|
8
8
|
|
9
9
|
attr_reader :module
|
10
10
|
|
11
|
-
def initialize
|
12
|
-
@module =
|
11
|
+
def initialize
|
12
|
+
@module = nil
|
13
13
|
end
|
14
14
|
|
15
15
|
def remote_path
|
@@ -24,6 +24,10 @@ def local_path
|
|
24
24
|
@module.source_directory
|
25
25
|
end
|
26
26
|
|
27
|
+
def copy_configuration( other )
|
28
|
+
@module = nil
|
29
|
+
end
|
30
|
+
|
27
31
|
end
|
28
32
|
|
29
33
|
#
|
@@ -12,12 +12,13 @@ def name
|
|
12
12
|
|
13
13
|
attr_reader :externals
|
14
14
|
|
15
|
-
def initialize
|
16
|
-
super
|
15
|
+
def initialize
|
16
|
+
super
|
17
17
|
@externals = {}
|
18
18
|
end
|
19
19
|
|
20
20
|
def vcs( mod )
|
21
|
+
raise StandardError if @module and ! mod.equal?( @module )
|
21
22
|
@module = mod
|
22
23
|
GitSvn.new( self )
|
23
24
|
end
|
@@ -26,6 +27,11 @@ def add_external( local, target )
|
|
26
27
|
@externals[local] = target
|
27
28
|
end
|
28
29
|
|
30
|
+
def copy_configuration( other )
|
31
|
+
super
|
32
|
+
@externals = {} # Do not copy the externals
|
33
|
+
end
|
34
|
+
|
29
35
|
end
|
30
36
|
|
31
37
|
#
|
data/lib/build-tool/vcs/git.rb
CHANGED
@@ -13,12 +13,13 @@ def name
|
|
13
13
|
|
14
14
|
attr_accessor :remote
|
15
15
|
|
16
|
-
def initialize
|
17
|
-
super
|
16
|
+
def initialize
|
17
|
+
super
|
18
18
|
@remote = {}
|
19
19
|
end
|
20
20
|
|
21
21
|
def vcs( mod )
|
22
|
+
raise StandardError if @module and ! mod.equal?( @module )
|
22
23
|
@module = mod
|
23
24
|
Git.new( self )
|
24
25
|
end
|
@@ -39,6 +40,10 @@ def track_branch
|
|
39
40
|
return rc[1..-1].join( '/' )
|
40
41
|
end
|
41
42
|
|
43
|
+
def copy_configuration( other )
|
44
|
+
super
|
45
|
+
@remote = {} # Do not copy the remotes
|
46
|
+
end
|
42
47
|
|
43
48
|
end
|
44
49
|
|
@@ -137,7 +142,7 @@ def fetch()
|
|
137
142
|
if !checkedout? and !$noop
|
138
143
|
clone
|
139
144
|
end
|
140
|
-
cmd = "fetch -q #{config.track_remote}"
|
145
|
+
cmd = "fetch -q --prune #{config.track_remote}"
|
141
146
|
if ( rc = git( cmd ) ) != 0
|
142
147
|
raise GitError, "Error while fetching: #{rc}"
|
143
148
|
end
|
@@ -19,6 +19,7 @@ def initialize( mod = nil )
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def vcs( mod )
|
22
|
+
raise StandardError if @module and ! mod.equal?( @module )
|
22
23
|
@module = mod
|
23
24
|
Mercurial.new( self )
|
24
25
|
end
|
@@ -26,6 +27,11 @@ def vcs( mod )
|
|
26
27
|
def branch
|
27
28
|
self.module.remote_path
|
28
29
|
end
|
30
|
+
|
31
|
+
def copy_configuration( other )
|
32
|
+
super
|
33
|
+
@remote = {} # Do not copy the remote
|
34
|
+
end
|
29
35
|
end
|
30
36
|
|
31
37
|
#
|
data/lib/build-tool/vcs/svn.rb
CHANGED
@@ -14,6 +14,7 @@ def name
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def vcs( mod )
|
17
|
+
raise StandardError if @module and ! mod.equal?( @module )
|
17
18
|
@module = mod
|
18
19
|
Svn.new( self )
|
19
20
|
end
|
@@ -24,6 +25,10 @@ def only=( list )
|
|
24
25
|
puts @only.inspect
|
25
26
|
end
|
26
27
|
|
28
|
+
def copy_configuration( other )
|
29
|
+
super
|
30
|
+
@only = nil # Do not copy nil
|
31
|
+
end
|
27
32
|
end
|
28
33
|
|
29
34
|
#
|
data/lib/mj/tools/subprocess.rb
CHANGED
@@ -20,15 +20,25 @@ def execute( command, wd = ENV["HOME"], env = nil )
|
|
20
20
|
begin
|
21
21
|
while
|
22
22
|
line = f.readline
|
23
|
-
|
23
|
+
if line.start_with?( "error:" )
|
24
|
+
logger.error line.chomp
|
25
|
+
elsif line.start_with?( "warning:" )
|
26
|
+
logger.warn line.chomp
|
27
|
+
elsif line.start_with?( "trace:" )
|
28
|
+
logger.trace line.chomp
|
29
|
+
elsif line.start_with?( "info:" )
|
30
|
+
logger.info line.chomp
|
31
|
+
else
|
32
|
+
logger.verbose line.chomp
|
33
|
+
end
|
24
34
|
yield line.chomp if block_given?
|
25
35
|
end
|
26
|
-
rescue EOFError
|
36
|
+
rescue EOFError
|
27
37
|
# Expected. Do nothing
|
28
38
|
end
|
29
39
|
}
|
30
40
|
if $?.coredump? or $?.signaled?
|
31
|
-
raise CoreDumpError, "Command '#{command}' core dumped because of signal #{$?.termsig}!"
|
41
|
+
raise CoreDumpError, "Command '#{command}' core dumped because of signal #{$?.termsig}!"
|
32
42
|
end
|
33
43
|
logger.trace "= #{$?.exitstatus}"
|
34
44
|
return $?.exitstatus
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Jansen
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
M3zOaQdtTmiQPBqNIsE=
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2010-
|
39
|
+
date: 2010-12-12 00:00:00 +01:00
|
40
40
|
default_executable:
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
@@ -206,6 +206,7 @@ email:
|
|
206
206
|
- info@michael-jansen.biz
|
207
207
|
executables:
|
208
208
|
- build-tool
|
209
|
+
- build-tool-1.9
|
209
210
|
extensions: []
|
210
211
|
|
211
212
|
extra_rdoc_files:
|
@@ -220,6 +221,7 @@ files:
|
|
220
221
|
- README.txt
|
221
222
|
- Rakefile
|
222
223
|
- bin/build-tool
|
224
|
+
- bin/build-tool-1.9
|
223
225
|
- db/migrations/001_command_histories.rb
|
224
226
|
- db/migrations/002_module_events.rb
|
225
227
|
- db/migrations/003_command_histories_add_logfile.rb
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
��^�r1Bzz)VW�I`2�X�HeI>P�Yy�2���
|
2
|
+
NV+j|d��a(�3[:���zx�aUf!��k�+ei2�Y��\C.MPگ�m��8��k]x��6�[5�#^H����-�&�VWX��]X��., �e�����Ep�<������K/�&���#���4�8+N��xML���m�aD�E�G�`|+���a�VCN�
|