Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Rake problem - how do I create 6 zip files rather than 1
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mark Pawelek, post: 5016528"] First of all, apologies for posting a rake question here but I can't find a rake forum and since my company changed their email system to google mail I can't find any of my groups from my work PC Q1: Is there a rake forum. If so, where is it? Q2: See below: How do I get my rake build script (rakefile.rb) to give me 6 zip files? It is only giving me 1 zip file. There are two projects each corresponding to a website and 3 servers to release to giving a total of 6 expected zip files: Admin_Release_Integration_20120405.zip Client_Release_Integration_20120405.zip Admin_Release_Park_Royal_20120405.zip Client_Release_Park_Royal_20120405.zip Admin_Release_Watford_20120405.zip Client_Release_Watford_20120405.zip Only 1 actual zip file appears. The last one: Client_Release_Watford_20120405.zip I guess that all 6 zip files are being created but that the previous 5 are all overwritten Why is this happening and what's a good way to fix the probem? PS: This runs on a Windows PC. The build uses rake/albacore In a nutshell, do I need to run 6 zip tasks or is there another way to do the zips without running from a zip task - can I use a generic task that invokes 6 zips? #--------------------------------------------------------------------- # Here are some parts of my rakefile relating to the zip_websites task #--------------------------------------------------------------------- BUILD_MODE = ENV["config"] || 'Debug' # OR 'Debug', 'Release' Live_server_sites = ['Integration', 'Park_Royal', 'Watford'] Websites = [ :Admin, :Client ] task :default => [:clean, :clean_all_builds, :svn_update, :compile, :unit_test, :publish_client, :publish_admin, :post_publish, :clean_build, :zip_websites] def zipit(zip, project, server) #copy correct web.config first if server == 'Integration' fextension = server elsif fextension = server + '_Staging' end File.delete "#{PUBLISH_DIR}/#{project}/web.config" File.copy_stream("#{PUBLISH_DIR}/#{project}/Config/web.config.#{fextension}", "#{PUBLISH_DIR}/#{project}/web.config") # zip-up the project zip.directories_to_zip = ["#{PUBLISH_DIR}/#{project}"] output_file = "#{project}_#{BUILD_MODE}_#{server}_#{Date.today.to_s.gsub('-','')}.zip" # e.g. Admin_Release_Park_Royal_20110526.zip zip.output_file = output_file zip.output_path = "#{PUBLISH_DIR}" return output_file end desc "Zip published websites" zip :zip_websites do |zip| if BUILD_MODE == 'Release' Live_server_sites.each do |server| Websites.each { |site| zipit zip, site, server } end end end [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Rake problem - how do I create 6 zip files rather than 1
Top