Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var project = new Project {
                Name = "CppSharp"
            };
            var repo = new GithubRepository(project)
            {
                Owner       = "mono",
                Name        = "CppSharp",
                URL         = @"https://github.com/mono/CppSharp.git",
                MinRevision = new Commit("cd3e729d3873a845eacee4260480e4c3dfe14579")
            };

            project.Repositories.Add(repo);

            var config = new BuildConfiguration();

            project.Configurations.Add(config);

            var options = new Options
            {
                OutputDir = @"C:\builds\",
                Username  = "******",
                Token     = "a32086c82fb50fc7acc4b33a5d183e23d4efa997"
            };

            Task.Run((() => LaunchBuildAgent(options)));

            using (var server = new BuildServer(options))
            {
                ConsoleUtils.SetupExitHandler(sig =>
                {
                    server.IsExiting = true;
                    return(true);
                });

                server.Projects.Add(project);
                server.RunServer();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var project = new Project { Name = "CppSharp" };
            var repo = new GithubRepository(project)
            {
                Owner = "mono",
                Name = "CppSharp",
                URL = @"https://github.com/mono/CppSharp.git",
                MinRevision = new Commit("cd3e729d3873a845eacee4260480e4c3dfe14579")
            };
            project.Repositories.Add(repo);

            var config = new BuildConfiguration();
            project.Configurations.Add(config);

            var options = new Options
            {
                OutputDir = @"C:\builds\",
                Username = "******",
                Token = "a32086c82fb50fc7acc4b33a5d183e23d4efa997"
            };

            Task.Run((() => LaunchBuildAgent(options)));

            using (var server = new BuildServer(options))
            {
                ConsoleUtils.SetupExitHandler(sig =>
                {
                    server.IsExiting = true;
                    return true;
                });

                server.Projects.Add(project);
                server.RunServer();
            }
        }