Skip to content

Commit

Permalink
more logging to see whats wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Pallister authored and Tom Pallister committed Oct 10, 2017
1 parent 68466b2 commit b0131bb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,28 @@ Task("DownloadGitHubReleaseArtifacts")
.IsDependentOn("UpdateVersionInfo")
.Does(() =>
{
Information("DownloadGitHubReleaseArtifacts");

EnsureDirectoryExists(packagesDir);

Information("Directory exists...");

var releaseUrl = tagsUrl + releaseTag;

Information("Release url " + releaseUrl);

var assets_url = ParseJson(GetResource(releaseUrl))
.GetValue("assets_url")
.Value<string>();

Information("Assets url " + assets_url);

foreach(var asset in DeserializeJson<JArray>(GetResource(assets_url)))
{
var file = packagesDir + File(asset.Value<string>("name"));

Information("Downloading " + file);

DownloadFile(asset.Value<string>("browser_download_url"), file);
}
});
Expand Down Expand Up @@ -416,7 +427,11 @@ private string GetResource(string url)
{
var assetsStream = assetsResponse.GetResponseStream();
var assetsReader = new StreamReader(assetsStream);
return assetsReader.ReadToEnd();
var response = assetsReader.ReadToEnd();

Information("Response is " + response);

return response;
}
}

Expand Down

0 comments on commit b0131bb

Please sign in to comment.