Esempio n. 1
0
 DotNetBuildSettings SonarBuildAll(DotNetBuildSettings settings) =>
 settings
 .SetProjectFile(SonarSolutionFile)
 .SetNoRestore(true)
 .SetConfiguration(Debug)
 .SetProcessWorkingDirectory(RootDirectory)
 .SetFramework(Net60);
Esempio n. 2
0
        /// <summary>
        /// Run Compile process
        /// </summary>
        /// <returns></returns>
        protected override StageCompletionStatusEnum ExecuteProcess()
        {
            DotNetBuildSettings dotNetBuildSettings = new DotNetBuildSettings()
            {
                ProjectFile        = CISession.Solution,
                NoRestore          = true,
                PropertiesInternal = new Dictionary <string, object>(),
            };

            dotNetBuildSettings = dotNetBuildSettings.SetProjectFile(CISession.Solution)
                                  .SetConfiguration(CISession.CompileConfig)
                                  .SetVerbosity(DotNetVerbosity.Minimal)
                                  .EnableNoRestore()
                                  .SetAssemblyVersion(CISession.VersionInfo.AssemblyVersion)
                                  .SetVersion(CISession.VersionInfo.AssemblyVersion)
                                  .SetInformationalVersion(CISession.VersionInfo.InformationalVersion)
                                  .SetFileVersion(CISession.VersionInfo.FileVersion);

            (BlockingCollection <ILineOut> outputs, int exitCode) = DotNetBuild(dotNetBuildSettings);
            StageOutput.AddRange(outputs);
            ControlFlow.Assert(exitCode == 0, "Process DotNetBuild failed");


            AOT_NewLine();
            AOT_Info("Compilation Status:");

            foreach (SlugCIProject project in CISession.SlugCIConfigObj.Projects)
            {
                foreach (ILineOut lineOut in outputs)
                {
                    if (lineOut.Text.StartsWith("  " + project.Name + " -> "))
                    {
                        AOT_Success("Compile Success:  " + lineOut.Text);
                        project.Results.CompileSuccess = true;
                        break;
                    }
                }
            }

            return(StageCompletionStatusEnum.Success);
        }