예제 #1
0
파일: Program.cs 프로젝트: tomdef/nTeamCity
        static void Main(string[] args)
        {
            if (args.Count() == 6)
            {
                string teamCityUrl = args[0].Trim();
                string userName = args[1].Trim();
                string password = args[2].Trim();
                string buildId = args[3].Trim();
                string assemblyPath = args[4].Trim();
                string prefix = args[5].Trim();

                TCConnection tcConnection = new TCConnection(teamCityUrl, userName, password);

                if (!String.IsNullOrEmpty(assemblyPath))
                {
                    Assembly assembly = Assembly.LoadFrom(assemblyPath);
                    if (assembly != null)
                    {
                        Version ver = assembly.GetName().Version;
                        tcConnection.AddBuildTags(buildId, nTeamCity.Core.Locators.Locator.ById, String.Concat(prefix, ver.ToString()));
                    }
                }
                else
                {
                    Console.WriteLine("Invalid assembly");
                }
            }
            else
            {
                Console.WriteLine("Invalid arguments");
                Console.WriteLine("TCAssemblyTagger.exe <url> <username> <password> <buildId> <assemblyPath> <tagPrefix>");
            }
        }
예제 #2
0
 public void TestAddTags()
 {
     tcConnection = new TCConnection("http://192.168.137.49", "admin", "admin");
     tcConnection.AddBuildTags("20", Core.Locators.Locator.ById, "TAG1", "TAG2");
 }