Skip to content

Commit

Permalink
Merge pull request #536 from Catel/GitHubSync/20240306-105516
Browse files Browse the repository at this point in the history
GitHubSync update
  • Loading branch information
GeertvanHorrik authored Mar 6, 2024
2 parents 4c3a2c4 + 1f3c426 commit 626d849
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions deployment/cake/generic-variables.cake
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public class SonarQubeContext : BuildContextBase
public string Url { get; set; }
public string Organization { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Token { get; set; }
public string Project { get; set; }

protected override void ValidateContext()
Expand Down Expand Up @@ -514,7 +514,7 @@ private GeneralContext InitializeGeneralContext(BuildContext buildContext, IBuil
Url = buildContext.BuildServer.GetVariable("SonarUrl", showValue: true),
Organization = buildContext.BuildServer.GetVariable("SonarOrganization", showValue: true),
Username = buildContext.BuildServer.GetVariable("SonarUsername", showValue: false),
Password = buildContext.BuildServer.GetVariable("SonarPassword", showValue: false),
Token = buildContext.BuildServer.GetVariable("SonarToken", showValue: false),
Project = buildContext.BuildServer.GetVariable("SonarProject", data.Solution.Name, showValue: true)
};

Expand Down
4 changes: 2 additions & 2 deletions deployment/cake/lib-msbuild.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#addin "nuget:?package=Cake.Issues&version=4.0.0"
#addin "nuget:?package=Cake.Issues.MsBuild&version=4.0.0"
#addin "nuget:?package=Cake.Issues&version=4.1.0"
#addin "nuget:?package=Cake.Issues.MsBuild&version=4.1.0"

#tool "nuget:?package=MSBuild.Extension.Pack&version=1.9.1"

Expand Down
2 changes: 1 addition & 1 deletion deployment/cake/sourcecontrol-github.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#addin "nuget:?package=Cake.GitHub&version=0.1.0"
#addin "nuget:?package=Octokit&version=9.1.2"
#addin "nuget:?package=Octokit&version=10.0.0"

//-------------------------------------------------------------

Expand Down
16 changes: 8 additions & 8 deletions deployment/cake/tasks.cake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// It probably means the tool is not correctly installed.
// `dotnet tool install --global dotnet-sonarscanner --ignore-failed-sources`
//#tool "nuget:?package=MSBuild.SonarQube.Runner.Tool&version=4.8.0"
#tool "nuget:?package=dotnet-sonarscanner&version=6.1.0"
#tool "nuget:?package=dotnet-sonarscanner&version=6.2.0"

//-------------------------------------------------------------
// BACKWARDS COMPATIBILITY CODE - START
Expand Down Expand Up @@ -397,9 +397,9 @@ Task("Build")
sonarSettings.Login = buildContext.General.SonarQube.Username;
}
if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Password))
if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Token))
{
sonarSettings.Password = buildContext.General.SonarQube.Password;
sonarSettings.Token = buildContext.General.SonarQube.Token;
}
// see https://cakebuild.net/api/Cake.Sonar/SonarBeginSettings/ for more information on
Expand Down Expand Up @@ -450,25 +450,25 @@ Task("Build")
{
await buildContext.SourceControl.MarkBuildAsPendingAsync("SonarQube");
var sonarEndSettings = new SonarEndSettings
var sonarSettings = new SonarEndSettings
{
// Use core clr version of SonarQube
UseCoreClr = true
};
if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Username))
{
sonarEndSettings.Login = buildContext.General.SonarQube.Username;
sonarSettings.Login = buildContext.General.SonarQube.Username;
}
if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Password))
if (!string.IsNullOrWhiteSpace(buildContext.General.SonarQube.Token))
{
sonarEndSettings.Password = buildContext.General.SonarQube.Password;
sonarSettings.Token = buildContext.General.SonarQube.Token;
}
Information("Ending SonarQube");
SonarEnd(sonarEndSettings);
SonarEnd(sonarSettings);
await buildContext.SourceControl.MarkBuildAsSucceededAsync("SonarQube");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.analyzers.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit.Analyzers" Version="3.10.0">
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 626d849

Please sign in to comment.