-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
374 additions
and
928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,4 +183,7 @@ UpgradeLog*.htm | |
FakesAssemblies/ | ||
/.vs | ||
/src/.vs | ||
*.orig | ||
*.orig | ||
*coverage.opencover.xml | ||
/tools | ||
.sonarqube/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: 2.0.{build} | ||
os: Visual Studio 2017 | ||
configuration: Release | ||
assembly_info: | ||
patch: true | ||
file: '**\AssemblyInfo.*' | ||
assembly_version: '{version}' | ||
assembly_file_version: '{version}' | ||
assembly_informational_version: '{version}' | ||
|
||
before_build: | ||
- cmd: dotnet --version | ||
|
||
build_script: | ||
# Cake. | ||
- ps: .\build.ps1 | ||
|
||
after_build: | ||
- cmd: buildNuget.cmd | ||
|
||
# Tests are executed by Cake. | ||
test: off | ||
|
||
artifacts: | ||
- path: .\src\nuget\*.nupkg | ||
name: Libraries NuGet packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#tool nuget:?package=MSBuild.SonarQube.Runner.Tool&version=4.6.0 | ||
#addin nuget:?package=Cake.Sonar&version=1.1.22 | ||
#addin nuget:?package=Cake.Git&version=0.19.0 | ||
|
||
var target = Argument("target", "Default"); | ||
var solutionDir = "src"; | ||
var sonarLogin = EnvironmentVariable("HarSharp_SonarQube_login"); | ||
var branch = EnvironmentVariable("APPVEYOR_REPO_BRANCH") ?? GitBranchCurrent(".").FriendlyName; | ||
|
||
if (string.IsNullOrEmpty(sonarLogin)) | ||
throw new Exception("You should set an environment variable 'HarSharp_SonarQube_login' with the token generated at the page https://sonarcloud.io/account/security/."); | ||
|
||
Task("Build") | ||
.Does(() => | ||
{ | ||
var settings = new DotNetCoreBuildSettings | ||
{ | ||
Configuration = "Release", | ||
}; | ||
|
||
DotNetCoreBuild(solutionDir, settings); | ||
}); | ||
|
||
Task("Test") | ||
.Does(() => | ||
{ | ||
var settings = new DotNetCoreTestSettings | ||
{ | ||
ArgumentCustomization = args => { | ||
return args.Append("/p:CollectCoverage=true") | ||
.Append("/p:CoverletOutputFormat=opencover"); | ||
} | ||
}; | ||
|
||
DotNetCoreTest(solutionDir, settings); | ||
}); | ||
|
||
Task("SonarBegin") | ||
.Does(() => | ||
{ | ||
SonarBegin(new SonarBeginSettings { | ||
Key = "HarSharp", | ||
Branch = branch, | ||
Organization = "giacomelli-github", | ||
Url = "https://sonarcloud.io", | ||
Exclusions = "**/*Test.cs,**/*.xml,**/AssemblyInfo.cs", | ||
OpenCoverReportsPath = "**/*.opencover.xml", | ||
Login = sonarLogin | ||
}); | ||
}); | ||
|
||
Task("SonarEnd") | ||
.Does(() => { | ||
SonarEnd(new SonarEndSettings{ | ||
Login = sonarLogin | ||
}); | ||
}); | ||
|
||
Task("Default") | ||
.IsDependentOn("SonarBegin") | ||
.IsDependentOn("Build") | ||
.IsDependentOn("Test") | ||
.IsDependentOn("SonarEnd") | ||
.Does(()=> { | ||
}); | ||
|
||
RunTarget(target); |
Oops, something went wrong.