Skip to content

Commit

Permalink
Merge pull request #24 from nils-a/release/0.2.0
Browse files Browse the repository at this point in the history
Release/0.2.0
  • Loading branch information
nils-a authored Nov 25, 2022
2 parents 12bcff9 + 727a175 commit 2e9a416
Showing 9 changed files with 33 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.5",
"version": "1.3.0",
"commands": [
"dotnet-cake"
]
23 changes: 8 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-2019, ubuntu-18.04, macos-10.15 ]
os: [ windows-2019, ubuntu-18.04, macos-11 ]
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
@@ -44,19 +44,14 @@ jobs:
uses: actions/checkout@v3
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- uses: actions/setup-dotnet@v2.0.0
- uses: actions/setup-dotnet@v3.0.3
with:
# codecov needs 2.1
dotnet-version: '2.1.818'
- uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: '3.1.x'
- uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: '5.0.x'
- uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: '6.0.x'
dotnet-version: |
2.1
3.1
5.0
6.0
- name: Cache Tools
uses: actions/cache@v3
with:
@@ -67,9 +62,7 @@ jobs:
with:
script-path: recipe.cake
target: CI
verbosity: Diagnostic
cake-version: 0.38.5
cake-bootstrap: true
cake-version: 1.3.0
- name: Upload Issues
uses: actions/upload-artifact@v3
with:
24 changes: 9 additions & 15 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -34,19 +34,14 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v2.0.0
- uses: actions/setup-dotnet@v3.0.3
with:
# codecov needs 2.1
dotnet-version: '2.1.818'
- uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: '3.1.x'
- uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: '5.0.x'
- uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: '6.0.x'
dotnet-version: |
2.1
3.1
5.0
6.0
- name: Cache Tools
uses: actions/cache@v3
@@ -56,7 +51,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -69,8 +64,7 @@ jobs:
with:
script-path: recipe.cake
target: DotNetCore-Build
cake-version: 0.38.5
cake-bootstrap: true
cake-version: 1.3.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
1 change: 0 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -9,6 +9,5 @@ $env:DOTNET_NOLOGO = '1'
dotnet tool restore
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

dotnet cake recipe.cake --bootstrap
dotnet cake recipe.cake @args
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -9,5 +9,4 @@ export DOTNET_NOLOGO=1

dotnet tool restore

dotnet cake recipe.cake --bootstrap
dotnet cake recipe.cake "$@"
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"allowPrerelease": true,
"version": "6.0.300",
"version": "6.0.402",
"rollForward": "latestFeature"
}
}
37 changes: 2 additions & 35 deletions recipe.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#load nuget:?package=Cake.Recipe&version=2.2.1
#load nuget:?package=Cake.Recipe&version=3.0.1

var standardNotificationMessage = "Version {0} of {1} has just been released, it will be available here https://www.nuget.org/packages/{1}, once package indexing is complete.";

@@ -14,44 +14,11 @@ BuildParameters.SetParameters(
twitterMessage: standardNotificationMessage,
preferredBuildProviderType: BuildProviderType.GitHubActions,
shouldRunDotNetCorePack: true,
shouldUseDeterministicBuilds: true,
shouldRunDupFinder: false, // dupFinder is missing since 2021.3.0-eap
shouldRunInspectCode: false // we're shipping a custom version of it below
shouldUseDeterministicBuilds: true
);

BuildParameters.PrintParameters(Context);

// workaround for https://github.com/cake-contrib/Cake.Recipe/issues/862
ToolSettings.SetToolPreprocessorDirectives(
reSharperTools: "#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2022.2.0");

ToolSettings.SetToolSettings(context: Context);

// additional workaround for https://github.com/cake-contrib/Cake.Recipe/issues/862
// to suppress the --build/--no-build warning that is generated in the default
BuildParameters.Tasks.InspectCodeTask = Task("InspectCode2021")
.WithCriteria(() => BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows, "Skipping due to not running on Windows")
.Does<BuildData>(data => RequireTool(ToolSettings.ReSharperTools, () => {
var inspectCodeLogFilePath = BuildParameters.Paths.Directories.InspectCodeTestResults.CombineWithFilePath("inspectcode.xml");

var settings = new InspectCodeSettings() {
SolutionWideAnalysis = true,
OutputFile = inspectCodeLogFilePath,
ArgumentCustomization = x => x.Append("--no-build")
};

if (FileExists(BuildParameters.SourceDirectoryPath.CombineWithFilePath(BuildParameters.ResharperSettingsFileName)))
{
settings.Profile = BuildParameters.SourceDirectoryPath.CombineWithFilePath(BuildParameters.ResharperSettingsFileName);
}

InspectCode(BuildParameters.SolutionFilePath, settings);

// Pass path to InspectCode log file to Cake.Issues.Recipe
IssuesParameters.InputFiles.InspectCodeLogFilePath = inspectCodeLogFilePath;
})
);
BuildParameters.Tasks.AnalyzeTask.IsDependentOn("InspectCode2021");
IssuesBuildTasks.ReadIssuesTask.IsDependentOn("InspectCode2021");

Build.RunDotNetCore();
Original file line number Diff line number Diff line change
@@ -8,20 +8,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="Spectre.Console" Version="0.44.0" />
<PackageReference Include="Spectre.Console.Testing" Version="0.44.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.analyzers" Version="0.10.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="Shouldly" Version="4.1.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.0" />
<PackageReference Include="Spectre.Console.Testing" Version="0.45.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.analyzers" Version="1.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Original file line number Diff line number Diff line change
@@ -31,13 +31,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="all" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Spectre.Console" Version="0.44.0" PrivateAssets="all" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.0" PrivateAssets="all" />
</ItemGroup>

</Project>

0 comments on commit 2e9a416

Please sign in to comment.