private static void SendToNuget() { Process PackagingProcess = new FileInfo("..\\..\\..\\BatmanPackages\\Package.bat").Execute(); PackagingProcess.WaitForExit(); foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\BatmanPackages\\").EnumerateFiles("*.nupkg", SearchOption.AllDirectories)) { File.Delete(); } }
private static void SendToNuget() { Console.WriteLine("Running package.bat"); Process PackagingProcess = new FileInfo("..\\..\\..\\BatmanPackages\\Package.bat").Execute(); PackagingProcess.WaitForExit(); foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\BatmanPackages\\").EnumerateFiles("*.nupkg", SearchOption.AllDirectories)) { Console.WriteLine("Deleting {0}", File.FullName); File.Delete(); } }
private static void CreatePackages() { new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\Packages").Create(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\Packages").DeleteFiles(); new FileInfo("..\\..\\..\\README.md").CopyTo("..\\..\\..\\UtilitiesPackages\\readme.txt"); foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\").EnumerateFiles("*.nuspec", SearchOption.AllDirectories).Where(x => !x.Name.Contains("Documentation"))) { new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").Create(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").Create(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").Create(); new DirectoryInfo("..\\..\\..\\" + File.Name.Replace(".nuspec", "") + "\\bin\\Release").CopyTo("..\\..\\..\\UtilitiesPackages\\lib"); Process NugetProcess = new FileInfo("..\\..\\..\\.nuget\\nuget.exe").Execute("pack \"" + File.FullName + "\"", WorkingDirectory: "..\\..\\..\\UtilitiesPackages\\Packages"); NugetProcess.WaitForExit(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").DeleteAll(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").DeleteAll(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").DeleteAll(); } foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\").EnumerateFiles("*.nuspec", SearchOption.AllDirectories).Where(x => x.Name.Contains("Documentation"))) { new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").Create(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").Create(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").Create(); Process DoxygenProcess = "doxygen.exe".Execute("\"" + File.FullName.Replace(".nuspec", ".doxy") + "\"", WorkingDirectory: "..\\..\\..\\UtilitiesPackages"); DoxygenProcess.WaitForExit(); Process NugetProcess = new FileInfo("..\\..\\..\\.nuget\\nuget.exe").Execute("pack \"" + File.FullName + "\"", WorkingDirectory: "..\\..\\..\\UtilitiesPackages\\Packages"); NugetProcess.WaitForExit(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").DeleteAll(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").DeleteAll(); new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").DeleteAll(); } new FileInfo("..\\..\\..\\UtilitiesPackages\\readme.txt").Delete(); }
private static void PushPackages() { foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\").EnumerateFiles("*.nupkg", SearchOption.AllDirectories)) { Process NugetProcess = new FileInfo("..\\..\\..\\.nuget\\nuget.exe").Execute("push \"" + File.FullName + "\""); NugetProcess.WaitForExit(); } }