Skip to content

Instantly share code, notes, and snippets.

View maxmanuylov's full-sized avatar

Maxim Manuylov maxmanuylov

  • JetBrains
  • Amsterdam
View GitHub Profile
@dotob
dotob / gist:4034731
Created November 7, 2012 21:51
teamcity sample artifact vs. buildinfo
private Uri CreateArtefactUri(Build build) {
string finalArtifactName = string.Empty;
try {
string artifactInfoUriString = string.Format("http://{0}/guestAuth/repository/download/{1}/{2}/teamcity-ivy.xml", this.teamCityHost, this.buildType, build.Number);
using (WebClient wc = new WebClient()) {
var artefactInfo = wc.DownloadString(artifactInfoUriString);
XDocument artifactInfoXmlDoc = XDocument.Parse(artefactInfo);
foreach (var artifactElement in artifactInfoXmlDoc.Element("ivy-module").Element("publications").Elements("artifact").Where(e => e.Attribute("ext").Value == "exe")) {
var artifactName = artifactElement.Attribute("name").Value;
if (Regex.IsMatch(artifactName, this.artifactNameMatch)) {