metabuild 0.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/lib/metabuild.rb +14 -8
  3. data/metabuild.gemspec +2 -2
  4. metadata +3 -2
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('metabuild', '0.3') do |s|
5
+ Echoe.new('metabuild', '0.3.1') do |s|
6
6
  s.author = "F. Brault"
7
7
  s.email = "castorpilot@yahoo.com"
8
8
  s.description = "MetaBuild is a ruby make-like tool that builds components. It supports tracking of dependencies among components, and a hierarchical reporting facility."
@@ -146,7 +146,7 @@ module Metabuild
146
146
  system(str + cmd)
147
147
  end
148
148
 
149
- # Run a shell command, log if it fails (override in child class)
149
+ # Run a shell command, log its status (override in child class)
150
150
  def run(command, env, fail_msg)
151
151
  env_system(command, env)
152
152
  end
@@ -263,9 +263,13 @@ module Metabuild
263
263
  @fail.empty?
264
264
  end
265
265
 
266
- # Run a shell command, log if it fails
266
+ # Run a shell command, log
267
267
  def run(command, env, fail_msg)
268
- failure fail_msg unless env_system(command, env)
268
+ if env_system(command, env)
269
+ add_success "[#{@name}] #{command} SUCCESS"
270
+ else
271
+ failure fail_msg
272
+ end
269
273
  end
270
274
 
271
275
  # Run a shell command, no logging
@@ -609,10 +613,12 @@ module Metabuild
609
613
  end
610
614
 
611
615
 
612
- # Run a shell command, log if it fails
616
+ # Run a shell command, log exit status
613
617
  def run(command, env, fail_msg)
614
618
  success, output= env_system(command, env)
615
- unless success
619
+ if success
620
+ add_success command, "#{command} success", output
621
+ else
616
622
  add_fail command, fail_msg, output
617
623
  stop
618
624
  end
@@ -624,7 +630,7 @@ module Metabuild
624
630
  stop unless success
625
631
  end
626
632
 
627
- # Run a shell command. Log success +and+ failure
633
+ # Run a shell command. Log success +and+ failure, do not abort on failure
628
634
  def valid(command, env, fail_msg, success_msg)
629
635
  success, output = env_system(command, env)
630
636
  if success
@@ -916,7 +922,7 @@ module Metabuild
916
922
  end
917
923
 
918
924
  # Run a shell command, giving it (optional) env variables (a hashmap), and (optional) failure message
919
- # Only log failures.
925
+ # Log success +and+ failure. Abort on failure.
920
926
  # :call-seq:
921
927
  # run(:cmd => "cmd", :env => env, :msg => "msg") -> nil
922
928
  # run("cmd") -> nil
@@ -943,7 +949,7 @@ module Metabuild
943
949
  end
944
950
 
945
951
  # Run a shell command, giving it (optional) env variables (a hashmap), and (optional) failure message
946
- # Log success +and+ failure.
952
+ # Log success +and+ failure. Do not abort on failure.
947
953
  # :call-seq:
948
954
  # valid(:cmd => "cmd", :env => env, :fail_msg => "msg", :success_msg => "msg") -> nil
949
955
  # valid("cmd") -> nil
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{metabuild}
5
- s.version = "0.3"
5
+ s.version = "0.3.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["F. Brault"]
9
- s.date = %q{2010-05-20}
9
+ s.date = %q{2010-05-25}
10
10
  s.description = %q{MetaBuild is a ruby make-like tool that builds components. It supports tracking of dependencies among components, and a hierarchical reporting facility.}
11
11
  s.email = %q{castorpilot@yahoo.com}
12
12
  s.extra_rdoc_files = ["README", "lib/metabuild.rb"]
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- version: "0.3"
8
+ - 1
9
+ version: 0.3.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - F. Brault
@@ -13,7 +14,7 @@ autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2010-05-20 00:00:00 +02:00
17
+ date: 2010-05-25 00:00:00 +02:00
17
18
  default_executable:
18
19
  dependencies: []
19
20