Powershell in CruiseControl.net to backup existing folder before deploying new version of the code
I would like to zip a bunch of files (.exe and .dll) before I overwrite them with the new build. Is there a simple way to zip files without using some sort of dll?
Just creating a folder with the build number / date time stamp will also work great. How do I pass parameters from the cruise control build process into my Powershell script that will do the work then?
Is this a sustainable way开发者_如何学C to do things?
Thanks
You could either use CCNET's Package Publisher Task directly or zip the files via the PowerShell Task introduced in CCNET 1.5.
Configuration sample for PowerShell Task:
<powershell>
<description>Adding scheduled jobs</description>
<scriptsDirectory>ScheduledTasks</scriptsDirectory>
<script>CreateScheduledJobsFromListOfTasks.ps1</script>
<buildArgs>-zipDir="C:\foo"</buildArgs>
</powershell>
精彩评论