I want to exclude some format files like PDB, XML and BMP files in my zip package.
Please help me on this http://cakebuild.net/api/Cake.Common.IO/ZipAliases/B6C83EAE.
I want to exclude some format files like PDB, XML and BMP files in my zip package.
Please help me on this http://cakebuild.net/api/Cake.Common.IO/ZipAliases/B6C83EAE.
Note the built in Zip aliases will only create a standard Zip file not 7zip, if it's only assemblies you want to include in your archive you can use the Zip(DirectoryPath rootPath, FilePath outputPath, string pattern) overload.
Example usage:
Zip("./", "dllfiles.zip", "./*.dll");
If you have several different file types, then I would recommend you create a directory with the artifacts you want to archive and then just zip that directory.
Another way is to use linq in the cakebuild, script. Something along these lines:
var ignoredExts = new string[] { ".bmp", ".xml", ".pdb" };
var files = GetFiles("./bin/Release/*.*")
.Where(f => !ignoredExts.Contains(f.GetExtension().ToLower()));
Zip("./", "cakeassemblies.zip", files);