diff --git a/.all-contributorsrc b/.all-contributorsrc index 13f12377..6f76a32d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -24,6 +24,15 @@ "bug", "code" ] + }, + { + "login": "DiDoHH", + "name": "DiDoHH", + "avatar_url": "https://avatars.githubusercontent.com/u/45682415?v=4", + "profile": "https://github.com/DiDoHH", + "contributions": [ + "doc" + ] } ], "contributorsPerLine": 7, diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index ffa86c44..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,23 +0,0 @@ -image: - - Visual Studio 2019 - -pull_requests: - do_not_increment_build_number: true - -skip_branch_with_pr: true - -branches: - only: - - main - - develop - - /release\/.*/ - - /hotfix\/.*/ - -test: off -build: off - -build_script: - - ps: .\build.ps1 --target=CI --verbosity=Diagnostic - -cache: - - "tools -> recipe.cake" diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a0dd5887..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "nuget" - directory: "/" - schedule: - interval: "daily" - commit-message: - prefix: "(maint)" - target-branch: "develop" - ignore: - - dependency-name: "Cake.Core" - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - commit-message: - prefix: "(maint)" - target-branch: "develop" diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..392c3ce5 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ "github>nils-a/renovate-config" ], + "packageRules": [ + { + "matchPackageNames": ["cake.tool", "Cake.Core"], + "enabled": false + } + ] +} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d26ab04..ca6414f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,16 +21,44 @@ jobs: matrix: os: [ windows-2019, ubuntu-18.04, macos-10.15 ] + env: + AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }} + AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }} + AZURE_USER: ${{ secrets.AZURE_USER }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + GITHUB_PAT: ${{ secrets.GH_TOKEN }} + GITTER_ROOM_ID: ${{ secrets.GITTER_ROOM_ID }} + GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }} + GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }} + GPR_SOURCE: ${{ secrets.GPR_SOURCE }} + GPR_USER: ${{ secrets.GPR_USER }} + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + NUGET_SOURCE: "https://api.nuget.org/v3/index.json" + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }} + WYAM_DEPLOY_BRANCH: "gh-pages" + WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }} + steps: - name: Checkout the repository uses: actions/checkout@v2 - name: Fetch all tags and branches run: git fetch --prune --unshallow + - uses: actions/setup-dotnet@v1.9.0 + with: + dotnet-version: | + 2.1.818 + 3.1.x + 5.0.x + 6.0.x - name: Cache Tools uses: actions/cache@v2 with: - path: tools - key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} + path: .cake + key: ${{ runner.os }}-cake-${{ hashFiles('recipe.cake') }} - name: Build project uses: cake-build/cake-action@v1 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4927563c..e7473f43 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,11 +38,19 @@ jobs: with: fetch-depth: 0 + - uses: actions/setup-dotnet@v1.9.0 + with: + dotnet-version: | + 2.1.818 + 3.1.x + 5.0.x + 6.0.x + - name: Cache Tools uses: actions/cache@v2 with: - path: tools - key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} + path: .cake + key: ${{ runner.os }}-cake-${{ hashFiles('recipe.cake') }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependabot-cake.yml b/.github/workflows/dependabot-cake.yml deleted file mode 100644 index f34a9670..00000000 --- a/.github/workflows/dependabot-cake.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Run dependabot for cake -on: - workflow_dispatch: - schedule: - # run everyday at 6 - - cron: '0 6 * * *' - -jobs: - dependabot-cake: - runs-on: ubuntu-latest # linux, because this is a docker-action - steps: - - name: check/update cake dependencies - uses: nils-org/dependabot-cake-action@v1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index f5e12477..8355ba2a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,8 @@ # GhostDoc plugin settings file *.GhostDoc.xml -# Ignore cake tools directory, except packages.config -tools/* +# Ignore cake .cake directory, except packages.config +.cake/* # Ignore build artifacts BuildArtifacts/ diff --git a/README.md b/README.md index d648db02..f92dbdeb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![standard-readme compliant][]][standard-readme] [![All Contributors][all-contributors-badge]](#contributors) [![Contributor Covenant][contrib-covenantimg]][contrib-covenant] -[![Appveyor build][appveyorimage]][appveyor] +[![Build][buildimage]][build] [![Codecov Report][codecovimage]][codecov] [![NuGet package][nugetimage]][nuget] @@ -67,13 +67,15 @@ Thanks goes to these wonderful people ([emoji key][emoji-key]): - - + + +

Nils Andresen

💻 📖

Pascal Berger

🐛 💻

Nils Andresen

💻 📖

Pascal Berger

🐛 💻

DiDoHH

📖
- + + ## License @@ -82,8 +84,8 @@ Thanks goes to these wonderful people ([emoji key][emoji-key]): [all-contributors]: https://github.com/all-contributors/all-contributors [all-contributors-badge]: https://img.shields.io/github/all-contributors/cake-contrib/cake.AsciiDoctorJ/develop?&style=flat-square -[appveyor]: https://ci.appveyor.com/project/cakecontrib/cake-asciidoctorj -[appveyorimage]: https://img.shields.io/appveyor/ci/cakecontrib/cake-asciidoctorj.svg?logo=appveyor&style=flat-square +[build]: https://github.com/cake-contrib/cake.asciidoctorj/actions/workflows/build.yml +[buildimage]: https://github.com/cake-contrib/cake.asciidoctorj/actions/workflows/build.yml/badge.svg [codecov]: https://codecov.io/gh/cake-contrib/Cake.AsciiDoctorJ [codecovimage]: https://img.shields.io/codecov/c/github/cake-contrib/Cake.AsciiDoctorJ.svg?logo=codecov&style=flat-square [contrib-covenant]: https://www.contributor-covenant.org/version/2/0/code_of_conduct/ diff --git a/cake.config b/cake.config new file mode 100644 index 00000000..09c33423 --- /dev/null +++ b/cake.config @@ -0,0 +1,3 @@ +; to align with https://github.com/cake-build/cake/issues/3263 +[Paths] +Tools=./.cake diff --git a/docs/input/_Bottom.cshtml b/docs/input/_Bottom.cshtml new file mode 100644 index 00000000..4ec1d7c2 --- /dev/null +++ b/docs/input/_Bottom.cshtml @@ -0,0 +1,8 @@ + + + GitHub + + + + Discussion + diff --git a/docs/input/assets/css/override.less b/docs/input/assets/css/override.less new file mode 100644 index 00000000..1812aa81 --- /dev/null +++ b/docs/input/assets/css/override.less @@ -0,0 +1,54 @@ +/* For GitHub */ +.bottom-footer { + margin-bottom: 40px !important; // Make room for GitHub buttons +} + +.github-button { + z-index: 100; + position: fixed; + bottom: 0px; + right: 255px; + padding: 1em 3em; + background-color: #367fa9; + border: 0; + border-top-left-radius: 0.5em; + border-top-right-radius: 0.5em; + font-family: sans-serif; + font-size: 9pt; + text-transform: uppercase; + text-align: center; + text-decoration: none; + cursor: pointer; + cursor: hand; + -webkit-transition: all .3s ease; + transition: all .3s ease; + color: #fff; + a, a:active, a:hover, a:focus { + color: #fff; + } +} + +.discussion-button { + z-index: 100; + position: fixed; + bottom: 0px; + right: 80px; + padding: 1em 3em; + background-color: #367fa9; + border: 0; + border-top-left-radius: 0.5em; + border-top-right-radius: 0.5em; + font-family: sans-serif; + font-size: 9pt; + text-transform: uppercase; + text-align: center; + text-decoration: none; + cursor: pointer; + cursor: hand; + -webkit-transition: all .3s ease; + transition: all .3s ease; + color: #fff; + a, a:active, a:hover, a:focus { + color: #fff; + } +} \ No newline at end of file diff --git a/recipe.cake b/recipe.cake index 0e1977b4..58cd28c8 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,5 +1,8 @@ #load nuget:?package=Cake.Recipe&version=2.2.1 +// Workaround for https://github.com/cake-contrib/Cake.Recipe/issues/854 +#tool nuget:?package=NuGet.CommandLine&version=5.8.1 + Environment.SetVariableNames(); BuildParameters.SetParameters( @@ -12,7 +15,9 @@ BuildParameters.SetParameters( repositoryName: "cake.asciidoctorj", appVeyorAccountName: "cakecontrib", shouldRunDotNetCorePack: true, - shouldUseDeterministicBuilds: true); + shouldUseDeterministicBuilds: true, + preferredBuildProviderType: BuildProviderType.GitHubActions, + preferredBuildAgentOperatingSystem: PlatformFamily.Linux); BuildParameters.PrintParameters(Context); diff --git a/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJAliasesTests.cs b/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJAliasesTests.cs index 4c5d8175..becbb0d4 100644 --- a/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJAliasesTests.cs +++ b/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJAliasesTests.cs @@ -2,7 +2,7 @@ using Cake.AsciiDoctorJ.Tests.Fixtures; -using FluentAssertions; +using Shouldly; using Xunit; @@ -17,7 +17,7 @@ public void Should_throw_if_settings_are_null() fixture.GivenSettingsIsNull(); Action action = () => fixture.Run(); - action.Should().Throw().WithMessage("*settings*"); + action.ShouldThrow().ParamName.ShouldBe("settings"); } [Fact] @@ -27,7 +27,7 @@ public void Should_not_throw_if_settings_are_set() var actual = fixture.Run(); - actual.Args.Should().Be(""); + actual.Args.ShouldBe(""); } [Fact] @@ -38,7 +38,7 @@ public void Should_not_throw_if_settings_are_null_but_called_fluently() var actual = fixture.RunFluent(x => { }); - actual.Args.Should().Be(""); + actual.Args.ShouldBe(""); } [Fact] @@ -48,7 +48,7 @@ public void Should_throw_if_context_is_null() fixture.GivenContextIsNull(); Action action = () => fixture.Run(); - action.Should().Throw().WithMessage("*context*"); + action.ShouldThrow().ParamName.ShouldBe("context"); } [Fact] @@ -58,7 +58,7 @@ public void Should_throw_if_context_is_null_called_fluently() fixture.GivenContextIsNull(); Action action = () => fixture.RunFluent(x => { }); - action.Should().Throw().WithMessage("*context*"); + action.ShouldThrow().ParamName.ShouldBe("context"); } } } diff --git a/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJRunnerTests.cs b/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJRunnerTests.cs index 385a7d34..1f78340a 100644 --- a/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJRunnerTests.cs +++ b/src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJRunnerTests.cs @@ -4,7 +4,7 @@ using Cake.Core; using Cake.Testing; -using FluentAssertions; +using Shouldly; using Xunit; @@ -23,7 +23,7 @@ public void Should_Throw_If_Settings_Are_Null() fixture.Run(); }; - result.Should().Throw(); + result.ShouldThrow(); } [Fact] @@ -34,7 +34,7 @@ public void Should_throw_if_asciidoctorj_executable_was_not_found() const string expectedMessage = "Could not locate executable"; Action result = () => fixture.Run(); - result.Should().Throw().Where(ex => ex.Message.Contains(expectedMessage)); + result.ShouldThrow().Message.ShouldContain(expectedMessage); } [Fact] @@ -44,7 +44,7 @@ public void Should_not_throw_if_asciidoctorj_executable_was_found() var actual = fixture.RunFluent(x => { }); - actual.Args.Should().Be(""); + actual.Args.ShouldBe(""); } [Fact] @@ -55,7 +55,7 @@ public void Should_not_throw_if_settings_are_null_on_fluent_invocation() var actual = fixture.RunFluent(x => { }); - actual.Args.Should().Be(""); + actual.Args.ShouldBe(""); } [Fact] @@ -68,7 +68,7 @@ public void Should_not_throw_if_settings_and_action_are_null_on_fluent_invocatio var actual = fixture.RunFluent(null); - actual.Args.Should().Be(""); + actual.Args.ShouldBe(""); } } } diff --git a/src/Cake.AsciiDoctorJ.Tests/Cake.AsciiDoctorJ.Tests.csproj b/src/Cake.AsciiDoctorJ.Tests/Cake.AsciiDoctorJ.Tests.csproj index e58abbbc..cc1ecf67 100644 --- a/src/Cake.AsciiDoctorJ.Tests/Cake.AsciiDoctorJ.Tests.csproj +++ b/src/Cake.AsciiDoctorJ.Tests/Cake.AsciiDoctorJ.Tests.csproj @@ -1,8 +1,7 @@ - netcoreapp2.1;netcoreapp3.1 - $(TargetFrameworks);net461 + netcoreapp3.1;net5.0;net6.0 ..\Cake.AsciiDoctorJ.ruleset false @@ -19,20 +18,19 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/src/Cake.AsciiDoctorJ.Tests/SettingsExtensionsTests.cs b/src/Cake.AsciiDoctorJ.Tests/SettingsExtensionsTests.cs index a82fb5e0..9727a096 100644 --- a/src/Cake.AsciiDoctorJ.Tests/SettingsExtensionsTests.cs +++ b/src/Cake.AsciiDoctorJ.Tests/SettingsExtensionsTests.cs @@ -6,7 +6,7 @@ using Cake.AsciiDoctorJ.Tests.Fixtures; using Cake.Core.IO; -using FluentAssertions; +using Shouldly; using Xunit; @@ -24,7 +24,7 @@ public void Should_convert_all_extensions_to_arguments(Action @@ -181,7 +181,7 @@ private class ArgSetterTestData : IEnumerable public IEnumerator GetEnumerator() { - return GetTestData().Select(x => new[] { (object)x.Item1, x.Item2, x.Item3 }).GetEnumerator(); + return GetTestData().Select(x => new[] { x.Item1, x.Item2, x.Item3 }).GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); diff --git a/src/Cake.AsciiDoctorJ.Tests/SettingsTests.cs b/src/Cake.AsciiDoctorJ.Tests/SettingsTests.cs index 93bbf212..1e044e77 100644 --- a/src/Cake.AsciiDoctorJ.Tests/SettingsTests.cs +++ b/src/Cake.AsciiDoctorJ.Tests/SettingsTests.cs @@ -1,4 +1,4 @@ -using FluentAssertions; +using Shouldly; using Xunit; using System.Collections; using System.Collections.Generic; @@ -21,7 +21,7 @@ public void Should_convert_all_setters_to_arguments(Action diff --git a/src/Cake.AsciiDoctorJ/Cake.AsciiDoctorJ.csproj b/src/Cake.AsciiDoctorJ/Cake.AsciiDoctorJ.csproj index e1c6e71a..ca2a8904 100644 --- a/src/Cake.AsciiDoctorJ/Cake.AsciiDoctorJ.csproj +++ b/src/Cake.AsciiDoctorJ/Cake.AsciiDoctorJ.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net461;net5.0 + netcoreapp3.1;net5.0;net6.0 true true $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb @@ -11,6 +11,7 @@ + @@ -28,6 +29,7 @@ cake;build;cake-build;addin;script;cake-addin;asciidoctorj https://github.com/cake-contrib/Cake.AsciiDoctorJ.git https://github.com/cake-contrib/Cake.AsciiDoctorJ/releases/tag/$(Version) + README.md @@ -35,22 +37,22 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive runtime; build; native; contentfiles; analyzers all - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive