Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Added default value when there are no tags
  Back to Convert.ToBoolean since GetEnvironmentBoolean was protected
  AppVeyor with an uppercase V
  Fixes
  Use `AppVeyor.GetEnvironmentBoolean`
  Use `WithCriteria` instead of `return`
  Only build tags on master
  Add `Optimize` MSBuild property for .NET Core builds too
  Set the MSBuild `Optimize` property to `true`
  Moved all links to the footer
  Replaced TeamCity with AppVeyor
  • Loading branch information
asbjornu committed Mar 11, 2018
2 parents 3ef46ca + 3ed4b3b commit 43bfbc5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 32 deletions.
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ SharpRaven is the .NET client for [Sentry](https://getsentry.com/welcome/).
| **GitHub** | [![GitHub release][1]][2] | - |
| **SharpRaven** | [![NuGet][3]][4] | [![NuGet][5]][4] |
| **SharpRaven.Nancy** | [![NuGet][6]][7] | [![NuGet][8]][7] |
| **Travis Build** | [![Master][12]][14] | [![Develop][13]][14] |
| **TeamCity Build** | [![Build Status][9]][10] | - |
| **Code Coverage** | [![TeamCity Coverage][11]][10] | - |
| **Travis Build** | [![Master][12]][14] | [![Develop][13]][14] |
| **AppVeyor Build** | [![Master][9]][10] | [![Develop][15]][10] |

## Usage
Instantiate the client with your DSN:
Expand Down Expand Up @@ -41,9 +40,8 @@ ravenClient.Capture(new SentryEvent("Hello World!"));
```

### Additional Data
You can add additional data to the
[`Exception.Data`](https://msdn.microsoft.com/en-us/library/system.exception.data.aspx)
property on exceptions thrown about in your solution:
You can add additional data to the [`Exception.Data`][ex] property on
exceptions thrown about in your solution:

```csharp
try
Expand Down Expand Up @@ -74,10 +72,9 @@ async Task<string> CaptureAsync(SentryEvent @event);

### Nancy Support
You can install the
[SharpRaven.Nancy](https://www.nuget.org/packages/SharpRaven.Nancy) package to
capture the HTTP context in [Nancy](http://nancyfx.org/) applications. It will
auto-register on the `IPipelines.OnError` event, so all unhandled exceptions
will be sent to Sentry.
[SharpRaven.Nancy][nuget-nancy] package to capture the HTTP context in
[Nancy][nancy] applications. It will auto-register on the `IPipelines.OnError`
event, so all unhandled exceptions will be sent to Sentry.

The only thing you have to do is provide a DSN, either by registering an
instance of the `Dsn` class in your container:
Expand Down Expand Up @@ -145,14 +142,14 @@ ravenClient.BeforeSend = requester =>
## Get it!
You can clone and build SharpRaven yourself, but for those of us who are happy
with prebuilt binaries, there's NuGet packages of both
[SharpRaven](https://www.nuget.org/packages/SharpRaven) and
[SharpRaven.Nancy](https://www.nuget.org/packages/SharpRaven.Nancy).
[SharpRaven][nuget] and
[SharpRaven.Nancy][nuget-nancy].

## Resources
* [![Join the chat at https://gitter.im/getsentry/raven-csharp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/getsentry/raven-csharp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
* [Code](http://github.com/getsentry/raven-csharp)
* [Mailing List](https://groups.google.com/group/getsentry)
* [IRC](irc://irc.freenode.net/sentry) (irc.freenode.net, #sentry)
* [![Join the chat at https://gitter.im/getsentry/raven-csharp][gitter-badge]][gitter-link]
* [Code][github]
* [Mailing List][mail]
* [IRC][irc] (`#sentry` on `irc.freenode.net`)

[1]: https://img.shields.io/github/release/getsentry/raven-csharp.svg
[2]: https://github.com/getsentry/raven-csharp/releases/latest
Expand All @@ -162,9 +159,18 @@ with prebuilt binaries, there's NuGet packages of both
[6]: https://img.shields.io/nuget/v/SharpRaven.Nancy.svg
[7]: https://www.nuget.org/packages/SharpRaven.Nancy
[8]: https://img.shields.io/nuget/vpre/SharpRaven.Nancy.svg
[9]: https://img.shields.io/teamcity/codebetter/bt1000.svg
[10]: http://teamcity.codebetter.com/viewType.html?buildTypeId=bt1000&guest=1
[11]: https://img.shields.io/teamcity/coverage/bt1000.svg?maxAge=2592000
[9]: https://img.shields.io/appveyor/ci/sentry/raven-csharp/master.svg
[10]: https://ci.appveyor.com/project/sentry/raven-csharp
[12]: https://travis-ci.org/getsentry/raven-csharp.svg?branch=master
[13]: https://travis-ci.org/getsentry/raven-csharp.svg?branch=develop
[14]: https://travis-ci.org/getsentry/raven-csharp
[15]: https://img.shields.io/appveyor/ci/sentry/raven-csharp/develop.svg
[ex]: https://msdn.microsoft.com/en-us/library/system.exception.data.aspx
[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
[gitter-link]: https://gitter.im/getsentry/raven-csharp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[github]: http://github.com/getsentry/raven-csharp
[mail]: https://groups.google.com/group/getsentry
[irc]: irc://irc.freenode.net/sentry
[nuget]: https://www.nuget.org/packages/SharpRaven
[nuget-nancy]: https://www.nuget.org/packages/SharpRaven.Nancy
[nancy]: http://nancyfx.org/
36 changes: 23 additions & 13 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var target = Argument("target", "Default");
var configuration = Argument("configuration", "Debug");
var nugetOrgApiKey = EnvironmentVariable("NuGetOrgApiKey");

var isAppveyor = BuildSystem.IsRunningOnAppVeyor;
var isAppVeyor = BuildSystem.IsRunningOnAppVeyor;
var isTravis = BuildSystem.IsRunningOnTravisCI;

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -50,7 +50,7 @@ var packages = new []

Setup(context =>
{
if (isAppveyor)
if (isAppVeyor)
{
AppVeyor.UpdateBuildVersion(gitVersion.FullBuildMetaData);
}
Expand Down Expand Up @@ -79,13 +79,9 @@ Task("RestorePackages")

Task("UpdateAssemblyInformation")
.Description("Update assembly information using GitVersion")
.WithCriteria(isAppVeyor)
.Does(() =>
{
if (!isAppveyor)
{
return;
}

GitVersion(new GitVersionSettings
{
UpdateAssemblyInfo = true,
Expand All @@ -110,20 +106,26 @@ Task("Build")
var settings = new MSBuildSettings
{
Configuration = configuration + "-" + framework,
ToolVersion = MSBuildToolVersion.VS2017,
ToolVersion = MSBuildToolVersion.VS2017
};
settings.WithProperty("TargetFramework", new string[] { framework });

settings.WithProperty("TargetFramework", new string[] { framework })
.WithProperty("Optimize", new string[] { "true" });

MSBuild(solution, settings);
}

foreach (var framework in dotnetFrameworks)
{
DotNetCoreBuild(solution, new DotNetCoreBuildSettings
var settings = new DotNetCoreBuildSettings
{
Framework = framework,
Configuration = configuration + "-" + framework,
});
MSBuildSettings = new DotNetCoreMSBuildSettings()
.WithProperty("Optimize", new string[] { "true" })
};

DotNetCoreBuild(solution, settings);
}
});

Expand All @@ -149,7 +151,7 @@ Task("Test")
Exclude = IsRunningOnWindows() ? null : "NuGet,NoMono",
});

if (isAppveyor)
if (isAppVeyor)
{
AppVeyor.UploadTestResults(resultPath, AppVeyorTestResultsType.NUnit);
}
Expand Down Expand Up @@ -193,8 +195,16 @@ Task("PublishNuGetPackages")
.IsDependentOn("Package")
.WithCriteria(() =>
{
if (!isAppVeyor)
{
return false;
}

var branchName = gitVersion.BranchName.Trim();
return branchName == "master" || branchName == "develop";
var taggedBuild = Convert.ToBoolean(EnvironmentVariable("APPVEYOR_REPO_TAG"));
var tag = EnvironmentVariable("APPVEYOR_REPO_TAG_NAME") ?? "<no tag>";
Information("{0}@{1}", branchName, tag);
return taggedBuild || branchName == "develop";
})
.Does(() =>
{
Expand Down

0 comments on commit 43bfbc5

Please sign in to comment.