Ignore shared projects and projects that do not have a project.json for
dependency management
This commit is contained in:
parent
f77328258c
commit
f01620402a
|
|
@ -55,6 +55,7 @@ namespace TCDependencyManager
|
|||
ProjectName = p,
|
||||
Dependencies = ReadDependencies(repo, p)
|
||||
})
|
||||
.Where(p => p.Dependencies != null)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
|
@ -70,6 +71,13 @@ namespace TCDependencyManager
|
|||
var content = JsonConvert.DeserializeObject<JObject>(
|
||||
Encoding.UTF8.GetString(
|
||||
Convert.FromBase64String(result["content"].Value<string>())));
|
||||
|
||||
// Ignore shared repos since they can have the same names
|
||||
if (content["shared"] != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var dependencies = (JObject)content["dependencies"];
|
||||
if (dependencies != null)
|
||||
{
|
||||
|
|
@ -78,9 +86,11 @@ namespace TCDependencyManager
|
|||
.Select(prop => prop.Name)
|
||||
.ToList();
|
||||
}
|
||||
return new List<string>(0);
|
||||
}
|
||||
}
|
||||
return new List<string>(0);
|
||||
// Ignore directories that do not have a project.json
|
||||
return null;
|
||||
}
|
||||
|
||||
private HttpClient GetClient()
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace TCDependencyManager
|
|||
Console.WriteLine("Creating dependency tree");
|
||||
MapRepoDependencies(projects);
|
||||
|
||||
Console.WriteLine("Ensuring depndencies are consistent on TeamCity");
|
||||
Console.WriteLine("Ensuring dependencies are consistent on TeamCity");
|
||||
foreach (var repo in repos.Where(p => p.Dependencies.Any()))
|
||||
{
|
||||
teamCity.EnsureDependencies(repo.Name, repo.Dependencies.Select(r => r.Name));
|
||||
|
|
|
|||
|
|
@ -112,7 +112,5 @@ namespace TCDependencyManager
|
|||
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue