Ejemplo n.º 1
0
 private void AddPublishDataFromArtifacts(BuildType buildConfig, TeamCityApi api)
 {
     //check artifacts..
     //TODO we cant detect feed here, so turn off when feed specific?
     foreach (var artifact in api.GetArtifactListByBuildType(buildConfig.Id).Where(a => a.Ext.Equals("nupkg")))
     {
         var package = Regex.Match(artifact.Name, @".+?(?=(?:(?:[\._]\d+){2,})$)").Value;
         AddBuildPackageMappingIfRequired(buildConfig);
         if (!_mappings[buildConfig.Name].Publishes.Contains(package))
         {
             _mappings[buildConfig.Name].Publishes.Add(package);
         }
     }
 }
        private static IEnumerable <string> GetPackageListFromArtifacts(BuildType buildConfig, TeamCityApi api)
        {
            var packages = new List <string>();

            foreach (var artifact in api.GetArtifactListByBuildType(buildConfig.Id).Where(a => a.Ext.Equals("nupkg")))
            {
                var package = Regex.Match(artifact.Name, @".+?(?=(?:(?:[\._]\d+){2,})$)").Value;
                if (!string.IsNullOrEmpty(package))
                {
                    packages.Add(package);
                }
            }
            return(packages);
        }
 private static IEnumerable<string> GetPackageListFromArtifacts(BuildType buildConfig, TeamCityApi api)
 {
     var packages = new List<string>();
     foreach (var artifact in api.GetArtifactListByBuildType(buildConfig.Id).Where(a => a.Ext.Equals("nupkg")))
     {
         var package = Regex.Match(artifact.Name, @".+?(?=(?:(?:[\._]\d+){2,})$)").Value;
         if (!string.IsNullOrEmpty(package))
             packages.Add(package);
     }
     return packages;
 }