public static void Push(FilePath nugetExecutableFilePath, NupkgFilePath packageFilePath, DirectoryPath nugetLocalRepositoryDirectoryPath, ILogger logger) { logger.LogDebug($"{packageFilePath} - Pushing package to:\n{nugetLocalRepositoryDirectoryPath}"); var arguments = $@"push ""{packageFilePath}"" -Source ""{nugetLocalRepositoryDirectoryPath}"""; ProcessRunner.Run(nugetExecutableFilePath.Value, arguments); logger.LogInformation($"{packageFilePath} - Pushed package to:\n{nugetLocalRepositoryDirectoryPath}"); }
public static void Push(this NuGetCommand command, NupkgFilePath packageFilePath, DirectoryPath nugetLocalRepositoryDirectoryPath) { NuGetCommandServicesProvider.Push(command.NuGetExecutableFilePath, packageFilePath, nugetLocalRepositoryDirectoryPath, command.Logger); }
public static void Pack(FilePath dotnetExecutableFilePath, ProjectFilePath projectFilePath, NupkgFilePath nupkgFilePath, ILogger logger) { var packageDirectoryPath = PathUtilities.GetDirectoryPath(nupkgFilePath); // Use the pack command to get the package file-path created by dotnet. var defaultPackageFilePath = DotnetCommandServicesProvider.Pack(dotnetExecutableFilePath, projectFilePath, packageDirectoryPath, logger); // If the package file-path created by dotnet is not the same as the specified package file-path, copy the file to the new path. if (nupkgFilePath.Value != defaultPackageFilePath.Value) { File.Copy(defaultPackageFilePath.Value, nupkgFilePath.Value, true); File.Delete(defaultPackageFilePath.Value); } }
public static NupkgFilePath AsNupkgFilePath(this string filePath) { var nupkgFilePath = new NupkgFilePath(filePath); return(nupkgFilePath); }