lib/boxgrinder-build/helpers/release-helper.rb in boxgrinder-build-0.0.7 vs lib/boxgrinder-build/helpers/release-helper.rb in boxgrinder-build-0.2.0
- old
+ new
@@ -56,11 +56,11 @@
[ :tgz, :zip ].each do |package_format|
task "appliance:#{@appliance_config.name}:package:#{package_format}" => [ @appliance_config.path.file.package[:raw][package_format], @appliance_config.path.file.package[:vmware][package_format] ]
[ :vmware, :raw ].each do |image_format|
basename = File.basename( @appliance_config.path.file.package[image_format][package_format] )
- files_to_upload = { basename => @appliance_config.path.file.package[image_format][package_format] }
+ files_to_upload = { "#{@appliance_config.name}/#{@appliance_config.version}.#{@appliance_config.release}/#{@appliance_config.hardware.arch}/#{basename}" => @appliance_config.path.file.package[image_format][package_format] }
desc "Create #{image_format.to_s.upcase} #{package_format.to_s.upcase} package for #{@appliance_config.simple_name} appliance"
task "appliance:#{@appliance_config.name}:package:#{image_format}:#{package_format}" => [ @appliance_config.path.file.package[image_format][package_format] ]
file @appliance_config.path.file.package[image_format][package_format] => [ @appliance_config.path.dir.packages, "appliance:#{@appliance_config.name}" ] do
@@ -108,11 +108,12 @@
@log.info "Appliance #{@appliance_config.simple_name} uploaded."
end
def upload_to_cloudfront( files )
+ AWSHelper.new( @config, @appliance_config )
- bucket = @config.release.cloudfront['bucket_name']
+ bucket = @config.data['release']['cloudfront']['bucket_name']
@log.info "Uploading #{@appliance_config.name} appliance to CloudFront bucket '#{bucket}'..."
begin
AWS::S3::Bucket.find( bucket )