lib/scms/s3deploy.rb in scms-1.8.7 vs lib/scms/s3deploy.rb in scms-1.8.8
- old
+ new
@@ -17,13 +17,18 @@
if $settings['clean'] != nil
unless $settings['clean']
removeold = ""
end
end
+
+ exclude = "--exclude='.svn'"
+ if $settings['ignore'] != nil
+ exclude = "--exclude=#{$settings["ignore"]}"
+ end
cmd = "s3sync"
- params = "--exclude='.svn' --progress --make-dirs --recursive --public-read #{removeold}"
+ params = "#{removeold} #{exclude} --progress --make-dirs --recursive --public-read "
if $settings['cache'] != nil
$settings['cache'].each do |folder|
ScmsUtils.log( "Syncing **#{folder}** caching: 1 year" )
cacheparams = "#{params} --cache-control='max-age=31449600' \"#{@pub}/#{folder}/\" #{$settings['bucket']}:#{folder}/"
@@ -55,10 +60,16 @@
if $settings['clean'] != nil
unless $settings['clean']
removeold = ""
end
end
- params = "--exclude='.svn' --progress --make-dirs --recursive #{removeold} \"#{privatedir}/\" #{$settings['bucket']}:private/"
+
+ exclude = "--exclude='.svn'"
+ if $settings['ignore'] != nil
+ exclude = "--exclude=#{$settings["ignore"]}"
+ end
+
+ params = "#{exclude} --progress --make-dirs --recursive #{removeold} \"#{privatedir}/\" #{$settings['bucket']}:private/"
ScmsUtils.run(cmd, params)
ScmsUtils.successLog("** Done :) **")
end
end
\ No newline at end of file