Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> jr_ntp : Only pass those env variables we're actually interested in
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Wed, 9 Sep 2009 17:06:01 +0200
  • Message-id: <E1MpkqH-0004un-UJ@xxxxxxxxxxxxxxxx>
ref: refs/heads/jr_ntp
commit 8d6849226ac2342e49edc87faf700bf6b98e0d4f
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Wed Sep 9 17:06:01 2009 +0200

Only pass those env variables we're actually interested in
---
Rakefile | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Rakefile b/Rakefile
index af4a184..41649fe 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,7 +10,7 @@ end
vars = ['PKG_BUILD', 'RCOV_PARAMS', 'RAILS_ENV', 'RAILS_PARENT']
ENV['RAILS_PARENT'] = File.join(Dir.pwd, 'webservice')

-env = ENV.map { |key,val| ENV[key] ? %(#{key}="#{ENV[key]}") : nil }.reject
{|x| x.nil?}.join(' ')
+env = ENV.map { |key,val| (ENV[key] && vars.include?( key )) ?
%(#{key}="#{ENV[key]}") : nil }.reject {|x| x.nil?}.join(' ')

plugins = Dir.glob('plugins/*')#.reject{|x|
['users'].include?(File.basename(x))}
PROJECTS = ['webservice', *plugins]
@@ -23,6 +23,9 @@ task :default => :test
task task_name do
PROJECTS.each do |project|
Dir.chdir(project) do
+ puts "Env: #{env.inspect}"
+ puts "$0: #{$0.inspect}"
+ puts "task: #{task_name.inspect}"
system %(#{env} #{$0} #{task_name})
raise "Error on execute task #{task_name} on #{project}" if
$?.exitstatus != 0
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages