예제 #1
0
        public void RemoveUselessFiles()
        {
            var f = new Futile(Console.Out);
            var q = new FsQuery(this.f.ParentPath, new string[]{"/.git","^/Releases", "^/Tests/Builder"});

            //delete /Tests/binaries  (*.pdb, *.xml, *.dll)
            //delete /Core/obj folder
            //Deleate all bin,obj,imageacache,uploads, and results folders under /Samples, /Tests, and /Plugins
            f.DelFiles(q.files("^/(Tests|Plugins|Samples)/*/(bin|obj|imagecache|uploads|results)/*",
                       "^/Core/obj/*","^/Core.Mvc/obj/*"));

            f.DelFiles(q.files("^/Samples/MvcSample/App_Data/*"));

            //delete .xml and .pdb files for third-party libs
            f.DelFiles(q.files("^/dlls/*/(Aforge|LitS3|Ionic)*.(pdb|xml)$"));

            //delete Thumbs.db
            //delete */.DS_Store
            f.DelFiles(q.files("/Thumbs.db$",
                                "/.DS_Store$"));
            q = null;
        }
예제 #2
0
        public void PrepareForPackaging()
        {
            if (q == null) q = new FsQuery(this.f.ParentPath, standardExclusions);
            //Don't copy XML or PDB files for the following libs:
            q.exclusions.Add(new Pattern("/(Newtonsoft.Json|DotNetZip|Aforge|LitS3|Ionic|NLog|MongoDB|Microsoft.|AWSSDK)*.(xml|pdb)$"));
            //Don't copy XML for these (but do keep pdb)
            q.exclusions.Add(new Pattern("/(OpenCvSharp|FreeImageNet)*.xml$"));
            //Exclude dependencies handled by NDP
            q.exclusions.Add(new Pattern("/(FreeImage|gsdll32|gsdll64).dll$"));

            //Exclude infrequently used but easily buildable stuff
            q.exclusions.Add(new Pattern("/ImageResizerGUI.exe$"));

            //Exclude resharper junk
            q.exclusions.Add(new Pattern("_ReSharper"));

            //Exclude temorary files
            q.exclusions.Add(new Pattern("^/Contrib/*/(bin|obj|imagecache|uploads|results)/*"));
            q.exclusions.Add(new Pattern("^/(Tests|Plugins|Samples)/*/(bin|obj|imagecache|uploads|hidden|results)/"));
            q.exclusions.Add(new Pattern("^/Core(.Mvc)?/obj/"));
            q.exclusions.Add(new Pattern("^/Tests/binaries"));

            //Exclude stuff that is not used or generally useful
            q.exclusions.Add(new Pattern("^/Tests/LibDevCassini"));
            q.exclusions.Add(new Pattern("^/Tests/ComparisonBenchmark/Images"));
            q.exclusions.Add(new Pattern("^/Samples/SqlReaderSampleVarChar"));
            q.exclusions.Add(new Pattern(".config.transform$"));
            q.exclusions.Add(new Pattern("^/Plugins/Libs/FreeImage/Examples/")); //Exclude examples folder
            q.exclusions.Add(new Pattern("^/Plugins/Libs/FreeImage/Wrapper/(Delphi|VB6|FreeImagePlus)")); //Exclude everything except the FreeImage.NET folder
            q.exclusions.Add(new Pattern("^/Plugins/Libs/FreeImage/Wrapper/FreeImage.NET/cs/[^L]*/")); //Exclude everything except the library folder
        }