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

Commit 43bfbc5

Browse files
committed
Merge branch 'develop'
* 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
2 parents 3ef46ca + 3ed4b3b commit 43bfbc5

2 files changed

Lines changed: 48 additions & 32 deletions

File tree

README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ SharpRaven is the .NET client for [Sentry](https://getsentry.com/welcome/).
77
| **GitHub** | [![GitHub release][1]][2] | - |
88
| **SharpRaven** | [![NuGet][3]][4] | [![NuGet][5]][4] |
99
| **SharpRaven.Nancy** | [![NuGet][6]][7] | [![NuGet][8]][7] |
10-
| **Travis Build** | [![Master][12]][14] | [![Develop][13]][14] |
11-
| **TeamCity Build** | [![Build Status][9]][10] | - |
12-
| **Code Coverage** | [![TeamCity Coverage][11]][10] | - |
10+
| **Travis Build** | [![Master][12]][14] | [![Develop][13]][14] |
11+
| **AppVeyor Build** | [![Master][9]][10] | [![Develop][15]][10] |
1312

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

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

4846
```csharp
4947
try
@@ -74,10 +72,9 @@ async Task<string> CaptureAsync(SentryEvent @event);
7472

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

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

151148
## Resources
152-
* [![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)
153-
* [Code](http://github.com/getsentry/raven-csharp)
154-
* [Mailing List](https://groups.google.com/group/getsentry)
155-
* [IRC](irc://irc.freenode.net/sentry) (irc.freenode.net, #sentry)
149+
* [![Join the chat at https://gitter.im/getsentry/raven-csharp][gitter-badge]][gitter-link]
150+
* [Code][github]
151+
* [Mailing List][mail]
152+
* [IRC][irc] (`#sentry` on `irc.freenode.net`)
156153

157154
[1]: https://img.shields.io/github/release/getsentry/raven-csharp.svg
158155
[2]: https://github.com/getsentry/raven-csharp/releases/latest
@@ -162,9 +159,18 @@ with prebuilt binaries, there's NuGet packages of both
162159
[6]: https://img.shields.io/nuget/v/SharpRaven.Nancy.svg
163160
[7]: https://www.nuget.org/packages/SharpRaven.Nancy
164161
[8]: https://img.shields.io/nuget/vpre/SharpRaven.Nancy.svg
165-
[9]: https://img.shields.io/teamcity/codebetter/bt1000.svg
166-
[10]: http://teamcity.codebetter.com/viewType.html?buildTypeId=bt1000&guest=1
167-
[11]: https://img.shields.io/teamcity/coverage/bt1000.svg?maxAge=2592000
162+
[9]: https://img.shields.io/appveyor/ci/sentry/raven-csharp/master.svg
163+
[10]: https://ci.appveyor.com/project/sentry/raven-csharp
168164
[12]: https://travis-ci.org/getsentry/raven-csharp.svg?branch=master
169165
[13]: https://travis-ci.org/getsentry/raven-csharp.svg?branch=develop
170166
[14]: https://travis-ci.org/getsentry/raven-csharp
167+
[15]: https://img.shields.io/appveyor/ci/sentry/raven-csharp/develop.svg
168+
[ex]: https://msdn.microsoft.com/en-us/library/system.exception.data.aspx
169+
[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
170+
[gitter-link]: https://gitter.im/getsentry/raven-csharp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
171+
[github]: http://github.com/getsentry/raven-csharp
172+
[mail]: https://groups.google.com/group/getsentry
173+
[irc]: irc://irc.freenode.net/sentry
174+
[nuget]: https://www.nuget.org/packages/SharpRaven
175+
[nuget-nancy]: https://www.nuget.org/packages/SharpRaven.Nancy
176+
[nancy]: http://nancyfx.org/

build.cake

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var target = Argument("target", "Default");
99
var configuration = Argument("configuration", "Debug");
1010
var nugetOrgApiKey = EnvironmentVariable("NuGetOrgApiKey");
1111

12-
var isAppveyor = BuildSystem.IsRunningOnAppVeyor;
12+
var isAppVeyor = BuildSystem.IsRunningOnAppVeyor;
1313
var isTravis = BuildSystem.IsRunningOnTravisCI;
1414

1515
//////////////////////////////////////////////////////////////////////
@@ -50,7 +50,7 @@ var packages = new []
5050

5151
Setup(context =>
5252
{
53-
if (isAppveyor)
53+
if (isAppVeyor)
5454
{
5555
AppVeyor.UpdateBuildVersion(gitVersion.FullBuildMetaData);
5656
}
@@ -79,13 +79,9 @@ Task("RestorePackages")
7979

8080
Task("UpdateAssemblyInformation")
8181
.Description("Update assembly information using GitVersion")
82+
.WithCriteria(isAppVeyor)
8283
.Does(() =>
8384
{
84-
if (!isAppveyor)
85-
{
86-
return;
87-
}
88-
8985
GitVersion(new GitVersionSettings
9086
{
9187
UpdateAssemblyInfo = true,
@@ -110,20 +106,26 @@ Task("Build")
110106
var settings = new MSBuildSettings
111107
{
112108
Configuration = configuration + "-" + framework,
113-
ToolVersion = MSBuildToolVersion.VS2017,
109+
ToolVersion = MSBuildToolVersion.VS2017
114110
};
115-
settings.WithProperty("TargetFramework", new string[] { framework });
111+
112+
settings.WithProperty("TargetFramework", new string[] { framework })
113+
.WithProperty("Optimize", new string[] { "true" });
116114

117115
MSBuild(solution, settings);
118116
}
119117

120118
foreach (var framework in dotnetFrameworks)
121119
{
122-
DotNetCoreBuild(solution, new DotNetCoreBuildSettings
120+
var settings = new DotNetCoreBuildSettings
123121
{
124122
Framework = framework,
125123
Configuration = configuration + "-" + framework,
126-
});
124+
MSBuildSettings = new DotNetCoreMSBuildSettings()
125+
.WithProperty("Optimize", new string[] { "true" })
126+
};
127+
128+
DotNetCoreBuild(solution, settings);
127129
}
128130
});
129131

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

152-
if (isAppveyor)
154+
if (isAppVeyor)
153155
{
154156
AppVeyor.UploadTestResults(resultPath, AppVeyorTestResultsType.NUnit);
155157
}
@@ -193,8 +195,16 @@ Task("PublishNuGetPackages")
193195
.IsDependentOn("Package")
194196
.WithCriteria(() =>
195197
{
198+
if (!isAppVeyor)
199+
{
200+
return false;
201+
}
202+
196203
var branchName = gitVersion.BranchName.Trim();
197-
return branchName == "master" || branchName == "develop";
204+
var taggedBuild = Convert.ToBoolean(EnvironmentVariable("APPVEYOR_REPO_TAG"));
205+
var tag = EnvironmentVariable("APPVEYOR_REPO_TAG_NAME") ?? "<no tag>";
206+
Information("{0}@{1}", branchName, tag);
207+
return taggedBuild || branchName == "develop";
198208
})
199209
.Does(() =>
200210
{

0 commit comments

Comments
 (0)