diff --git a/.appveyor.yml b/.appveyor.yml index 7d2aff7..1b1db52 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,13 +1,13 @@ #---------------------------------# # Build Image # #---------------------------------# -image: Visual Studio 2019 +image: Ubuntu #---------------------------------# # Build Script # #---------------------------------# build_script: - - ps: .\build.ps1 --target=CI + - sh: ./build.sh --target=CI #---------------------------------# # Tests diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 723ee16..be5a030 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,14 @@ name: Build on: push: + branches: + - master + - develop + - "feature/**" + - "release/**" + - "hotfix/**" + tags: + - "*" paths-ignore: - "README.md" pull_request: @@ -9,7 +17,6 @@ on: jobs: build: runs-on: ${{ matrix.os }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: matrix: os: [windows-latest, ubuntu-18.04, macos-latest] @@ -39,6 +46,15 @@ jobs: - name: Fetch all tags and branches run: git fetch --prune --unshallow + + - name: Install .NET SDK + uses: actions/setup-dotnet@v1 + with: + # gitversion needs 5.0 and we need all SDKs the project is targeting + dotnet-version: | + 3.1.415 + 5.0.403 + 6.0.100 - name: Cache Tools uses: actions/cache@v2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ac156b4..8774cb9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,6 +38,15 @@ jobs: # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2 if: ${{ github.event_name == 'pull_request' }} + + - name: Install .NET SDK + uses: actions/setup-dotnet@v1 + with: + # gitversion needs 5.0 and we need all SDKs the project is targeting + dotnet-version: | + 3.1.415 + 5.0.403 + 6.0.100 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependabot-cake.yml b/.github/workflows/dependabot-cake.yml index 20eae35..06f12fd 100644 --- a/.github/workflows/dependabot-cake.yml +++ b/.github/workflows/dependabot-cake.yml @@ -10,4 +10,4 @@ jobs: runs-on: ubuntu-18.04 # linux, because this is a docker-action steps: - name: check/update cake dependencies - uses: nils-org/dependabot-cake-action@v1 + uses: nils-org/dependabot-cake-action@v1.1.0 diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 7fc81cb..b9fed99 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -21,13 +21,13 @@ jobs: key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} - name: Set up git version if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }} - uses: gittools/actions/gitversion/setup@v0.9.9 + uses: gittools/actions/gitversion/setup@v0.9.11 with: versionSpec: "5.x" - name: Run git version if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }} id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.9 + uses: gittools/actions/gitversion/execute@v0.9.11 - name: Create release branch ${{ github.event.inputs.version }} if: ${{ steps.gitversion.outputs.majorMinorPatch }} run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }} diff --git a/README.md b/README.md index ac1a5f2..32b26f7 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,12 @@ Please visit the Cake Documentation for a list of available aliases: [http://cakebuild.net/dsl/json](http://cakebuild.net/dsl/json) +## Discussion + +For questions and to discuss ideas & feature requests, use the [GitHub discussions on the Cake GitHub repository](https://github.com/cake-build/cake/discussions), under the [Extension Q&A](https://github.com/cake-build/cake/discussions/categories/extension-q-a) category. + +[![Join in the discussion on the Cake repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/cake-build/cake/discussions) + + ## Apache License 2.0 Apache Cake.Json Copyright 2015. The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/recipe.cake b/recipe.cake index 1a10e57..82f59b2 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,4 +1,4 @@ -#load nuget:?package=Cake.Recipe&version=2.2.0 +#load nuget:?package=Cake.Recipe&version=2.2.1 Environment.SetVariableNames(); diff --git a/src/Cake.Json.Tests/Cake.Json.Tests.csproj b/src/Cake.Json.Tests/Cake.Json.Tests.csproj index 9cf5280..5dc2e3c 100644 --- a/src/Cake.Json.Tests/Cake.Json.Tests.csproj +++ b/src/Cake.Json.Tests/Cake.Json.Tests.csproj @@ -1,23 +1,22 @@ - net50;netcoreapp2.1 + netcoreapp3.1;net5.0;net6.0 false - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Cake.Json.Tests/FakeCakeArguments.cs b/src/Cake.Json.Tests/FakeCakeArguments.cs index 903e0cc..ee3893e 100644 --- a/src/Cake.Json.Tests/FakeCakeArguments.cs +++ b/src/Cake.Json.Tests/FakeCakeArguments.cs @@ -1,5 +1,5 @@ -using System; using Cake.Core; +using System; using System.Collections.Generic; namespace Cake.Json.Tests @@ -62,6 +62,11 @@ public ICollection GetArguments(string name) ICollection collection = value; return collection ?? Array.Empty(); } + + public IDictionary> GetArguments() + { + return _arguments as IDictionary>; + } } } diff --git a/src/Cake.Json/Cake.Json.csproj b/src/Cake.Json/Cake.Json.csproj index 2edfb2a..7a29670 100644 --- a/src/Cake.Json/Cake.Json.csproj +++ b/src/Cake.Json/Cake.Json.csproj @@ -1,7 +1,7 @@ - net50;netstandard2.0;net46 + netcoreapp3.1;net5.0;net6.0 true true snupkg @@ -12,7 +12,7 @@ Cake.Json JSON Serialization and manipulation addon for cake build. Cake Build addon for JSON Serialization and manipulation. - cake;script;build;cake-addin + cake;script;build;cake-addin;addin;cake-build Redth Redth, cake-contrib https://github.com/cake-contrib/Cake.Json.git @@ -23,18 +23,18 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Cake.Json/icon.png b/src/Cake.Json/icon.png index 9881edc..84c2a82 100644 Binary files a/src/Cake.Json/icon.png and b/src/Cake.Json/icon.png differ