Looks good to me. I normally set things up to use svn+ssh with ssh keys to avoid having to manage passwords for continuous integration builds.
If you can open a Jira issue and attach your code, I'll merge it into the codebase. thanks, alex On Fri, Nov 27, 2009 at 3:31 AM, Danny O'Connor <[email protected]>wrote: > Hi All, > > When you're using buildr with the hudson continuous integration server, the > 'release' task won't work because buildr needs a credential for svn. This > would probably happen in any situation where you don't cached authentication > for svn servers. > > A quick patch is to allow svn username and password be set as environment > variables like so: > > # Modified to allow usernames/passwords for svn > module Buildr > module Svn > module_function > def svn(*args) > if ENV["svn_username"] and ENV["svn_password"] then > svn_command = "svn --username #{ENV["svn_username"]} --password > #{ENV["svn_password"]} #{args.shift} #{args.map { |arg| arg.inspect }.join(' > ')}" > else > svn_command = "svn #{args.shift} #{args.map { |arg| arg.inspect > }.join(' ')}" > end > output = `#{svn_command}` > fail "SVN command failed with status #{$?.exitstatus}" unless > $?.exitstatus == 0 > return output > end > end > end > > > I'm not sure if this is entirely correct though. > > Regards, > Danny. > >
