Mark Pawelek
unread,Apr 5, 2012, 12:39:22 PM4/5/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
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