Skip to content

Commit

Permalink
Merge branch 'main' into refactor-next-version-calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornu committed Nov 23, 2022
2 parents 059375f + d056ec8 commit 0977561
Show file tree
Hide file tree
Showing 64 changed files with 430 additions and 218 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ jobs:
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -96,10 +95,9 @@ jobs:
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Build]'
shell: pwsh
Expand Down Expand Up @@ -160,10 +158,9 @@ jobs:
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Unit Test]'
shell: pwsh
Expand Down Expand Up @@ -213,10 +210,9 @@ jobs:
path: ${{ github.workspace }}/artifacts/packages/nuget
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Test Artifacts]'
shell: pwsh
Expand Down Expand Up @@ -274,10 +270,9 @@ jobs:
install: true
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Test Artifacts (amd64)]'
shell: pwsh
Expand Down Expand Up @@ -333,10 +328,9 @@ jobs:
install: true
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: Login to DockerHub
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools'
Expand Down Expand Up @@ -424,10 +418,9 @@ jobs:
path: ${{ github.workspace }}/artifacts/packages/nuget
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Publish]'
shell: pwsh
Expand Down Expand Up @@ -479,10 +472,9 @@ jobs:
path: ${{ github.workspace }}/artifacts/packages/native
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Release]'
shell: pwsh
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ jobs:

-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'

-
name: '[Prepare]'
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ jobs:
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Get npm cache directory
shell: bash
id: cache-node-dir
run: echo "::set-output name=dir::$(npm config get cache)"
run: |
cacheDir=$(npm config get cache)
echo "dir=$cacheDir" >> $GITHUB_OUTPUT
-
name: Cache Node Modules
id: cache-node
Expand All @@ -70,10 +73,9 @@ jobs:
restore-keys: node-${{ runner.os }}
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -105,10 +107,9 @@ jobs:
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Build Documentation]'
shell: pwsh
Expand All @@ -118,15 +119,13 @@ jobs:
uses: chabad360/htmlproofer@master
with:
directory: ./artifacts/docs/preview
arguments: --url-ignore /api/ --allow-hash-href --assume-extension --disable-external
arguments: --ignore-urls /api/,/docs/ --allow-hash-href --assume-extension --disable-external
-
name: Reviewdog Reporter
uses: haya14busa/action-cond@v1
name: '[Reviewdog Reporter]'
id: reporter
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: github-pr-review
if_false: github-check
run: |
value=$([ ${{ github.event_name == 'pull_request' }} ] && echo "github-pr-review" || echo "github-check")
echo "value=$value" >> $GITHUB_OUTPUT
-
name: '[Remark Lint]'
uses: reviewdog/[email protected]
Expand Down Expand Up @@ -163,10 +162,9 @@ jobs:
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: '[Publish Documentation]'
if: ${{ github.event_name == 'push' }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ jobs:
- uses: actions/checkout@v3
-
name: Setup .NET SDK
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
dotnet-version: '7.0.x'
dotnet-quality: 'preview'
-
name: Run Format Build solution
run: dotnet format ./build/ --verify-no-changes
Expand Down
4 changes: 2 additions & 2 deletions .remarkrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ plugins:
- remark-lint-no-blockquote-without-marker
- remark-lint-no-consecutive-blank-lines
- remark-lint-no-duplicate-definitions
- remark-lint-no-duplicate-headings
- remark-lint-no-duplicate-headings: ["warn"]
- remark-lint-no-emphasis-as-heading
- remark-lint-no-empty-url
- remark-lint-no-file-name-articles
- remark-lint-no-file-name-consecutive-dashes
- remark-lint-no-file-name-irregular-characters
- remark-lint-no-file-name-irregular-characters: ["warn"]
- remark-lint-no-file-name-mixed-case
- remark-lint-no-file-name-outer-dashes
- remark-lint-no-heading-content-indent
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ works out the [Semantic Version][semver] of the commit being built.
| **GitVersion.Portable** | [![Chocolatey][choco-badge]][choco] |
| **GitVersion.Tool** | [![NuGet][gvgt-badge]][gvgt] |
| **GitVersion.CommandLine** | [![NuGet][gvcl-badge]][gvcl] |
| **GitVersion.MsBuild** | [![NuGet][gvt-badge]][gvt] | Known as [GitVersionTask] before v5.6.0 |
| **GitVersion.MsBuild** | [![NuGet][gvt-badge]][gvt] | Known as [GitVersionTask][gitversiontask] before v5.6.0 |
| **Homebrew** | [![homebrew][brew-badge]][brew] |
| **Azure Pipeline Task** | [![Azure Pipeline Task][az-pipeline-task-badge]][az-pipeline-task] |
| **Github Action** | [![Github Action][gh-actions-badge]][gh-actions] |
Expand Down
14 changes: 7 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ You should receive a response within 24 hours. If for some reason you do not, pl

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

Expand Down
1 change: 0 additions & 1 deletion build/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<Using Include="Common.Utilities.Constants" Alias="Constants"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.Common" />
<PackageReference Include="Cake.Compression" />
<PackageReference Include="Cake.Frosting" />
<PackageReference Include="Cake.Incubator" />
Expand Down
3 changes: 1 addition & 2 deletions build/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Cake.Common" Version="2.3.0" />
<PackageVersion Include="Cake.Compression" Version="0.3.0" />
<PackageVersion Include="Cake.Codecov" Version="1.0.1" />
<PackageVersion Include="Cake.Coverlet" Version="2.5.4" />
<PackageVersion Include="Cake.Frosting" Version="2.3.0" />
<PackageVersion Include="Cake.Frosting" Version="3.0.0" />
<PackageVersion Include="Cake.Incubator" Version="7.0.0" />
<PackageVersion Include="Cake.DotNetLocalTools.Module" Version="1.0.2" />
<PackageVersion Include="Cake.Docker" Version="1.1.2" />
Expand Down
4 changes: 2 additions & 2 deletions build/artifacts/BuildLifetime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ namespace Artifacts;

public class BuildLifetime : BuildLifetimeBase<BuildContext>
{
public override void Setup(BuildContext context)
public override void Setup(BuildContext context, ISetupContext info)
{
base.Setup(context);
base.Setup(context, info);

context.IsDockerOnLinux = context.DockerCustomCommand("info --format '{{.OSType}}'").First().Replace("'", string.Empty) == "linux";

Expand Down
4 changes: 2 additions & 2 deletions build/build/BuildLifetime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace Build;

public class BuildLifetime : BuildLifetimeBase<BuildContext>
{
public override void Setup(BuildContext context)
public override void Setup(BuildContext context, ISetupContext info)
{
base.Setup(context);
base.Setup(context, info);

context.MsBuildConfiguration = context.Argument(Arguments.Configuration, "Release");
context.EnabledUnitTests = context.IsEnabled(EnvVars.EnabledUnitTests);
Expand Down
1 change: 1 addition & 0 deletions build/build/Tasks/Test/UnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Cake.Coverlet;
using Cake.Incubator.LoggingExtensions;
using Common.Utilities;
using CoverletSettings = Common.Addins.Cake.Coverlet.CoverletSettings;

namespace Build.Tasks;

Expand Down
2 changes: 1 addition & 1 deletion build/chores/BuildLifetime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Chores;

public class BuildLifetime : FrostingLifetime<BuildContext>
{
public override void Setup(BuildContext context)
public override void Setup(BuildContext context, ISetupContext info)
{
context.StartGroup("Build Setup");
context.EndGroup();
Expand Down
14 changes: 7 additions & 7 deletions build/common/Addins/Cake.Coverlet/ArgumentsProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ namespace Common.Addins.Cake.Coverlet;

internal static class ArgumentsProcessor
{
public static ProcessArgumentBuilder ProcessMSBuildArguments(
public static ProcessArgumentBuilder ProcessMsBuildArguments(
CoverletSettings settings,
ICakeEnvironment cakeEnvironment,
ProcessArgumentBuilder builder,
FilePath project)
{
builder.AppendMSBuildProperty(nameof(CoverletSettings.CollectCoverage), settings.CollectCoverage.ToString());
builder.AppendMsBuildProperty(nameof(CoverletSettings.CollectCoverage), settings.CollectCoverage.ToString());
builder.AppendPropertyList(nameof(CoverletSettings.CoverletOutputFormat), SplitFlagEnum(settings.CoverletOutputFormat));

if (settings.Threshold.HasValue)
Expand All @@ -20,7 +20,7 @@ public static ProcessArgumentBuilder ProcessMSBuildArguments(
throw new Exception("Threshold Percentage cannot be set as greater than 100%");
}

builder.AppendMSBuildProperty(nameof(CoverletSettings.Threshold), settings.Threshold.ToString()!);
builder.AppendMsBuildProperty(nameof(CoverletSettings.Threshold), settings.Threshold.ToString()!);

if (settings.ThresholdType != ThresholdType.NotSet)
{
Expand All @@ -33,7 +33,7 @@ public static ProcessArgumentBuilder ProcessMSBuildArguments(
var directoryPath = settings.CoverletOutputDirectory
.MakeAbsolute(cakeEnvironment).FullPath;

builder.AppendMSBuildPropertyQuoted("CoverletOutput", directoryPath);
builder.AppendMsBuildPropertyQuoted("CoverletOutput", directoryPath);
}
else if (!string.IsNullOrEmpty(settings.CoverletOutputName))
{
Expand All @@ -42,7 +42,7 @@ public static ProcessArgumentBuilder ProcessMSBuildArguments(

var filepath = FilePath.FromString(settings.OutputTransformer(settings.CoverletOutputName, directoryPath));

builder.AppendMSBuildPropertyQuoted("CoverletOutput", filepath.MakeAbsolute(cakeEnvironment).FullPath);
builder.AppendMsBuildPropertyQuoted("CoverletOutput", filepath.MakeAbsolute(cakeEnvironment).FullPath);
}

if (settings.ExcludeByFile.Count > 0)
Expand All @@ -69,12 +69,12 @@ public static ProcessArgumentBuilder ProcessMSBuildArguments(

if (settings.MergeWithFile != null && settings.MergeWithFile.GetExtension() == ".json")
{
builder.AppendMSBuildPropertyQuoted("MergeWith", settings.MergeWithFile.MakeAbsolute(cakeEnvironment).FullPath);
builder.AppendMsBuildPropertyQuoted("MergeWith", settings.MergeWithFile.MakeAbsolute(cakeEnvironment).FullPath);
}

if (settings.IncludeTestAssembly.HasValue)
{
builder.AppendMSBuildProperty(nameof(CoverletSettings.IncludeTestAssembly), settings.IncludeTestAssembly.Value ? bool.TrueString : bool.FalseString);
builder.AppendMsBuildProperty(nameof(CoverletSettings.IncludeTestAssembly), settings.IncludeTestAssembly.Value ? bool.TrueString : bool.FalseString);
}

return builder;
Expand Down
4 changes: 2 additions & 2 deletions build/common/Addins/Cake.Coverlet/BuilderExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ namespace Common.Addins.Cake.Coverlet;

internal static class BuilderExtension
{
internal static ProcessArgumentBuilder AppendMSBuildProperty(this ProcessArgumentBuilder builder, string propertyName, string value)
internal static ProcessArgumentBuilder AppendMsBuildProperty(this ProcessArgumentBuilder builder, string propertyName, string value)
{
builder.AppendSwitch($"/property:{propertyName}", "=", value);
return builder;
}

internal static ProcessArgumentBuilder AppendMSBuildPropertyQuoted(this ProcessArgumentBuilder builder, string propertyName, string value)
internal static ProcessArgumentBuilder AppendMsBuildPropertyQuoted(this ProcessArgumentBuilder builder, string propertyName, string value)
{
builder.AppendSwitchQuoted($"/property:{propertyName}", "=", value);
return builder;
Expand Down
Loading

0 comments on commit 0977561

Please sign in to comment.