private int PreProcess()
        {
            Logger.LogInfo(Resources.MSG_PreparingDirectories);
            if (!Utilities.TryEnsureEmptyDirectories(Logger, BootstrapSettings.TempDirectory))
            {
                return(ErrorCode);
            }

            CopyDLLs();
            Logger.IncludeTimestamp = true;

            ITeamBuildPreProcessor preProcessor = ProcessorFactory.CreatePreProcessor();

            Directory.SetCurrentDirectory(BootstrapSettings.TempDirectory);
            bool success = preProcessor.Execute(BootstrapSettings.ChildCmdLineArgs.ToArray());

            return(success ? SuccessCode : ErrorCode);
        }
Esempio n. 2
0
        private int PreProcess()
        {
            Logger.LogInfo(Resources.MSG_PreparingDirectories);
            if (!Utilities.TryEnsureEmptyDirectories(Logger, BootstrapSettings.TempDirectory))
            {
                return(ErrorCode);
            }

            CopyDLLs();
            string server = BootstrapSettings.SonarQubeUrl;

            Debug.Assert(!string.IsNullOrWhiteSpace(server), "Not expecting the server URL to be null/empty");
            Logger.LogDebug(Resources.MSG_ServerUrl, server);

            Utilities.LogAssemblyVersion(Logger, typeof(Program).Assembly, Resources.AssemblyDescription);
            Logger.IncludeTimestamp = true;

            ITeamBuildPreProcessor preProcessor = ProcessorFactory.CreatePreProcessor();

            Directory.SetCurrentDirectory(BootstrapSettings.TempDirectory);
            bool success = preProcessor.Execute(BootstrapSettings.ChildCmdLineArgs.ToArray());

            return(success ? SuccessCode : ErrorCode);
        }