Browse files

working progressbar and uploading packages to remote host

  • Loading branch information...
1 parent 12a4cf8 commit 14ea50cffd9a0fc0c6ce12ed117af04e5920eea5 @goldmann goldmann committed Oct 22, 2009
Showing with 12 additions and 12 deletions.
  1. +1 −0 .gitignore
  2. +0 −2 lib/cantiere/cantiere.rb
  3. +3 −1 lib/cantiere/helpers/ssh-helper.rb
  4. +0 −1 lib/cantiere/rpm.rb
  5. +8 −8 lib/cantiere/ssh/ssh-config.rb
View
1 .gitignore
@@ -2,5 +2,6 @@ build
*.swp
sources-cache
specs
+src
log
.idea
View
2 lib/cantiere/cantiere.rb
@@ -27,8 +27,6 @@
require 'cantiere/gpg-sign'
require 'cantiere/validator/config-validator'
-$stderr.reopen("/dev/null")
-
module Cantiere
class Cantiere
def initialize( project_config = Hash.new )
View
4 lib/cantiere/helpers/ssh-helper.rb
@@ -77,6 +77,8 @@ def upload_files( path, files = {} )
end
end
+ puts
+
nb = 0
files.each do |key, local|
@@ -95,7 +97,7 @@ def upload_files( path, files = {} )
remote_md5_sum = @ssh.exec!( "md5sum #{remote} | awk '{ print $1 }'" ).strip
if (local_md5_sum.eql?( remote_md5_sum ))
- @log.info "#{nb_of} #{name}: files are identical (md5sum: #{local_md5_sum}), skipping..."
+ puts "#{nb_of} #{name}: files are identical (md5sum: #{local_md5_sum}), skipping..."
next
end
end
View
1 lib/cantiere/rpm.rb
@@ -66,7 +66,6 @@ def define_tasks
file @rpm_file => [ 'rpm:topdir', @spec_file ] do
@log.info "Building package '#{@rpm_file_basename}'..."
build_source_dependencies( @rpm_file, @rpm_version, @rpm_release )
- puts "a"
build_rpm
@log.info "Package '#{@rpm_file_basename}' was built successfully."
end
View
16 lib/cantiere/ssh/ssh-config.rb
@@ -36,18 +36,18 @@ def initialize( config )
end
def validate
- raise ValidationError, "Specified configuration file (#{@config.config_file}) doesn't exists. #{DEFAULT_HELP_TEXT[:general]}" unless File.exists?( @config.config_file )
- raise ValidationError, "No 'ssh' section in config file in configuration file '#{@config.config_file}'. #{DEFAULT_HELP_TEXT[:general]}" if @config.release.ssh.nil?
+ raise ValidationError, "Specified configuration file (#{CONFIG_FILE}) doesn't exists. #{DEFAULT_HELP_TEXT[:general]}" unless File.exists?( CONFIG_FILE )
+ raise ValidationError, "No 'ssh' section in config file in configuration file '#{CONFIG_FILE}'. #{DEFAULT_HELP_TEXT[:general]}" if @config.data['ssh'].nil?
# we need only ssh section
- @cfg = @config.release.ssh
+ @cfg = @config.data['ssh']
- raise ValidationError, "Host not specified in configuration file '#{@config.config_file}'. #{DEFAULT_HELP_TEXT[:general]}" if @cfg['host'].nil?
- raise ValidationError, "Username not specified in configuration file '#{@config.config_file}'. #{DEFAULT_HELP_TEXT[:general]}" if @cfg['username'].nil?
+ raise ValidationError, "Host not specified in configuration file '#{CONFIG_FILE}' in ssh section. #{DEFAULT_HELP_TEXT[:general]}" if @cfg['host'].nil?
+ raise ValidationError, "Username not specified in configuration file '#{CONFIG_FILE}' in ssh section. #{DEFAULT_HELP_TEXT[:general]}" if @cfg['username'].nil?
- @options['host'] = @config.release.ssh['host']
- @options['username'] = @config.release.ssh['username']
- @options['password'] = @config.release.ssh['password']
+ @options['host'] = @cfg['host']
+ @options['username'] = @cfg['username']
+ @options['password'] = @cfg['password']
end
attr_reader :options

0 comments on commit 14ea50c

Please sign in to comment.