Esempio n. 1
0
        static void IncrimentVersion()
        {
            Console.WriteLine("incrimenting version...");

            string[] projectPaths =
            {
                "../../../../../../src/ScottPlot/ScottPlot.csproj",
                "../../../../../../src/ScottPlot.WinForms/ScottPlot.WinForms.NUGET.csproj",
                "../../../../../../src/ScottPlot.WPF/ScottPlot.WPF.NUGET.csproj",
                "../../../../../../src/ScottPlot.Avalonia/ScottPlot.Avalonia.NUGET.csproj"
            };

            foreach (string projectPathRel in projectPaths)
            {
                string projectPath = System.IO.Path.GetFullPath(projectPathRel);
                if (!System.IO.File.Exists(projectPath))
                {
                    throw new ArgumentException($"file not found: {projectPath}");
                }

                var    projVersion = new ProjectFileVersion(projectPath);
                string oldVersion  = projVersion.version.ToString();
                projVersion.Incriment();
                string newVersion = projVersion.version.ToString();
                Console.WriteLine($"{oldVersion} -> {newVersion} ({projVersion.name})");
                projVersion.Save();
            }
        }
Esempio n. 2
0
        static void IncrimentVersion()
        {
            Console.WriteLine("incrimenting version...");

            string[] projectNames = new string[] { "ScottPlot", "ScottPlot.WinForms", "ScottPlot.WPF" };

            foreach (string projectName in projectNames)
            {
                string projectPath = $"../../../../../../src/{projectName}/{projectName}.csproj";
                projectPath = System.IO.Path.GetFullPath(projectPath);
                if (!System.IO.File.Exists(projectPath))
                {
                    throw new ArgumentException($"file not found: {projectPath}");
                }

                var    projVersion = new ProjectFileVersion(projectPath);
                string oldVersion  = projVersion.version.ToString();
                projVersion.Incriment();
                string newVersion = projVersion.version.ToString();
                Console.WriteLine($"{oldVersion} -> {newVersion} ({projVersion.name})");
                projVersion.Save();
            }
        }