Exemple #1
0
        public static string PushToSource(Project project, string source, string buildProfile)
        {
            var pathToPackage = Path.Combine(Path.GetDirectoryName(project.Path), "bin", buildProfile,
                                             $"{ProjectsScanner.GetProjectNameFromPath(project.Path)}.{VersionConverter.ToString(project.Version)}.nupkg");

            using var cmd = GetCommandProcess("dotnet", $"nuget push --source {source} {pathToPackage}");

            cmd.Start();
            cmd.WaitForExit();

            return(cmd.StandardOutput.ReadToEnd());
        }