From 489c29319f3ff73491c02a446f7d0ec34037bc29 Mon Sep 17 00:00:00 2001 From: Adam Ralph Date: Sat, 23 Dec 2023 17:27:17 +0000 Subject: [PATCH] target .NET 8 --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 52 ++++++++----------- .github/workflows/release.yml | 2 +- .vscode/launch.json | 2 +- Directory.Build.props | 2 + MinVer.Lib/Commit.cs | 8 ++- MinVer.Lib/Git.cs | 10 ++-- MinVer.Lib/MinVer.Lib.csproj | 3 +- MinVer.Lib/NoGitException.cs | 5 +- MinVer.Lib/Versioner.cs | 35 +++++-------- MinVer/Logger.cs | 6 +-- MinVer/MinVer.csproj | 3 +- MinVer/build/MinVer.targets | 1 + MinVerTests.Infra/MinVerCli.cs | 3 ++ MinVerTests.Infra/MinVerTests.Infra.csproj | 2 +- MinVerTests.Infra/Sdk.cs | 47 +++++++++++------ MinVerTests.Infra/StringExtensions.cs | 14 +++++ MinVerTests.Lib/Infra/TestLogger.cs | 6 +-- MinVerTests.Lib/LogMessages.cs | 4 +- MinVerTests.Lib/MinVerTests.Lib.csproj | 2 +- MinVerTests.Lib/Versions.cs | 3 +- MinVerTests.Packages/AnnotatedTag.cs | 2 +- MinVerTests.Packages/BuildMetadata.cs | 2 +- .../CommitAfterPreReleaseTag.cs | 2 +- MinVerTests.Packages/CommitAfterRtmTag.cs | 2 +- .../CommitAfterTagWithBuildMetadata.cs | 2 +- MinVerTests.Packages/CustomAutoIncrement.cs | 2 +- .../CustomDefaultPreReleaseIdentifiers.cs | 6 +-- MinVerTests.Packages/EmptyRepo.cs | 2 +- MinVerTests.Packages/FirstCommit.cs | 2 +- .../MinVerTests.Packages.csproj | 2 +- .../MinimumMajorMinorAfterTag.cs | 2 +- .../MinimumMajorMinorOnTag.cs | 2 +- MinVerTests.Packages/MultipleProjects.cs | 4 +- MinVerTests.Packages/NoRepo.cs | 2 +- MinVerTests.Packages/NonVersionTag.cs | 2 +- MinVerTests.Packages/OptionMasking.cs | 10 ++-- MinVerTests.Packages/PreReleaseTag.cs | 2 +- MinVerTests.Packages/SourceLink.cs | 14 +++-- MinVerTests.Packages/TagWithBuildMetadata.cs | 2 +- MinVerTests.Packages/TagWithPrefix.cs | 2 +- .../TwoCommitsAfterPreReleaseTag.cs | 2 +- MinVerTests.Packages/TwoCommitsAfterRtmTag.cs | 2 +- MinVerTests.Packages/VersionOverride.cs | 2 +- global.json | 2 +- minver-cli/Logger.cs | 6 +-- minver-cli/minver-cli.csproj | 3 +- targets/Program.cs | 9 ++-- targets/Targets.csproj | 2 +- 49 files changed, 162 insertions(+), 144 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1f694f71..8ce77a5b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,3 @@ -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-7.0 +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-8.0 RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install lts/* && npm install -g cspell 2>&1" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70449dbb..cd7821ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,29 +16,23 @@ jobs: - job: os: macos-11 tests: - framework: net6.0 - sdk: "6.0.417" - sdk-major-minor: "6.0" + framework: net8.0 + sdk: "8.0.100" + sdk-major-minor: "8.0" # current macOS, latest LTS and latest - job: os: macos-12 tests: - framework: net6.0 - sdk: "6.0.417" - sdk-major-minor: "6.0" - - job: - os: macos-12 - tests: - framework: net7.0 - sdk: "7.0.404" - sdk-major-minor: "7.0" + framework: net8.0 + sdk: "8.0.100" + sdk-major-minor: "8.0" # old Linux, latest LTS - job: os: ubuntu-20.04 tests: - framework: net6.0 - sdk: "6.0.417" - sdk-major-minor: "6.0" + framework: net8.0 + sdk: "8.0.100" + sdk-major-minor: "8.0" # current Linux, all - job: os: ubuntu-22.04 @@ -53,26 +47,26 @@ jobs: framework: net7.0 sdk: "7.0.404" sdk-major-minor: "7.0" - # old Windows, latest LTS - job: - os: windows-2019 + os: ubuntu-22.04 tests: - framework: net6.0 - sdk: "6.0.417" - sdk-major-minor: "6.0" - # current Windows, latest LTS and latest + framework: net8.0 + sdk: "8.0.100" + sdk-major-minor: "8.0" + # old Windows, latest LTS - job: - os: windows-2022 + os: windows-2019 tests: - framework: net6.0 - sdk: "6.0.417" - sdk-major-minor: "6.0" + framework: net8.0 + sdk: "8.0.100" + sdk-major-minor: "8.0" + # current Windows, latest LTS and latest - job: os: windows-2022 tests: - framework: net7.0 - sdk: "7.0.404" - sdk-major-minor: "7.0" + framework: net8.0 + sdk: "8.0.100" + sdk-major-minor: "8.0" name: ${{ matrix.job.os }}-sdk-${{ matrix.tests.sdk-major-minor }} runs-on: ${{ matrix.job.os }} steps: @@ -80,7 +74,7 @@ jobs: with: dotnet-version: | ${{ matrix.tests.sdk }} - 7.0.404 + 8.0.100 - run: dotnet --info - run: git --version - uses: actions/checkout@v4.1.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 380d78c3..c9f4d638 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.404 + dotnet-version: 8.0.100 - uses: actions/checkout@v4.1.1 - env: MINVER_VERSION: ${{ vars.MINVER_VERSION }} diff --git a/.vscode/launch.json b/.vscode/launch.json index d769f426..49e37fa8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": ".NET Launch (console)", "type": "coreclr", "request": "launch", - "program": "${workspaceFolder}/targets/bin/Debug/net7.0/Targets.dll", + "program": "${workspaceFolder}/targets/bin/Debug/net8.0/Targets.dll", "args": [ "default" ], diff --git a/Directory.Build.props b/Directory.Build.props index 083bdfb0..5d9ccc4e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,6 +6,8 @@ true true true + + EnableGenerateDocumentationFile enable