asp.net - MSBuild script to remove old files from a directory that are no longer in source control -
the context live website using teamcity pull git. deployed website not under source control. need clean old files on deployed site no longer in source control particular folder. we're doing in msbuild deleting in folder first, before doing copy:
<itemgroup> <dirstoclean include="$(webdir)\foldertocleanse" /> </itemgroup> <target name="cleanwork"> <removedir directories="@(dirstoclean)" /> </target> <target name="copyfiles"> <message text="== copying website files =="></message> <copy sourcefiles="@(all)" destinationfiles="@(all->'$(webdir)/%(recursivedir)%(filename)%(extension)')" skipunchangedfiles="true" overwritereadonlyfiles="true"></copy> </target>
we want able without deleting files in foldertocleanse
, re-transferring everything, because not elegant , interferes change detection software.
Comments
Post a Comment