Example #1
0
        public Task StartAsync(CancellationToken cancellationToken)
        {
            try
            {
                gitVersionExecutor.Execute(arguments);
            }
            catch (Exception exception)
            {
                Console.Error.WriteLine(exception.Message);
            }

            applicationLifetime.StopApplication();
            return(Task.CompletedTask);
        }
Example #2
0
        public Task StartAsync(CancellationToken cancellationToken)
        {
            try
            {
                var arguments = options.Value;
                log.Verbosity = arguments.Verbosity;
                System.Environment.ExitCode = gitVersionExecutor.Execute(arguments);
            }
            catch (Exception exception)
            {
                Console.Error.WriteLine(exception.Message);
                System.Environment.ExitCode = 1;
            }

            applicationLifetime.StopApplication();
            return(Task.CompletedTask);
        }