Ejemplo n.º 1
0
        static int Main2(string[] args)
        {
            Console.Out.WriteLine("JetBrains TeamCity NuGet Runner " + typeof(Program).Assembly.GetName().Version);
            Console.Out.WriteLine("Starting NuGet with TeamCity provided plugins...");
            if (args.Length < 2)
            {
                return(Usage());
            }

            string nuget  = args[0];
            var    runner = new NuGetRunner(nuget);

            ConfigureExtensions(runner);

            Console.Out.WriteLine("Starting NuGet.exe {1} from {0}", runner.NuGetAssembly.GetAssemblyPath(), runner.NuGetVersion);

            switch (args[1])
            {
            case "---TeamCity.DumpExtensionsPath":
                Console.Out.WriteLine("ExtensionsPath: {0}", runner.LocateNuGetExtensionsPath() ?? "null");
                return(0);

            case "--TeamCity.NuGetVersion":
                Console.Out.WriteLine("TeamCity.NuGetVersion: " + runner.NuGetVersion);
                Console.Out.WriteLine();
                return(0);

            default:
                return(runner.Run(args.Skip(1).ToArray()));
            }
        }
 protected NuGetInstallExtensionsBase(NuGetRunner runner)
 {
     NuGetExtensionsHome = new Lazy <string>(() => Path.Combine(runner.LocateNuGetExtensionsPath(), "TeamCity.Extensions"));
 }