52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using ln.http;
|
|
using ln.http.router;
|
|
using ln.json;
|
|
using ln.logging;
|
|
using ln.type;
|
|
using ln.threading;
|
|
using ln.build;
|
|
using ln.build.repositories;
|
|
using Microsoft.VisualBasic;
|
|
using ln.application;
|
|
using System.IO;
|
|
|
|
namespace ln.build.server
|
|
{
|
|
class Program
|
|
{
|
|
static CIService CIService;
|
|
|
|
[StaticArgument( LongOption = "build")]
|
|
public static string BuildPath { get; set; }
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
ArgumentContainer ac = new ArgumentContainer(typeof(Program));
|
|
|
|
CIService = new CIService();
|
|
ac.AddOptions(CIService);
|
|
ac.Parse(ref args);
|
|
|
|
CIService.Initialize();
|
|
|
|
if (BuildPath != null)
|
|
{
|
|
CIJob job = new CIJob(CIService,null);
|
|
job.WorkingDirectory = BuildPath;
|
|
job.RunJob();
|
|
} else {
|
|
CIService.Initialize();
|
|
CIService.AddRepositoryInterface(new GiteaRepositoryInterface("https://git.l--n.de"){ AuthorizationToken = "1d03e9577c404b5b4f46b340147b1d500ff95b2e", });
|
|
|
|
CIService.Start();
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|