diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index df058170ac..5f35c29825 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,4 +1,4 @@
-FROM mcr.microsoft.com/devcontainers/dotnet:dev-9.0
+FROM mcr.microsoft.com/devcontainers/dotnet:dev-10.0
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
diff --git a/.editorconfig b/.editorconfig
index f199d80f9e..709cd532da 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -170,6 +170,9 @@ dotnet_diagnostic.rcs1037.severity = error
# RCS1036: Remove redundant empty line.
dotnet_diagnostic.rcs1036.severity = error
+dotnet_diagnostic.S2325.severity = none
+dotnet_diagnostic.S4136.severity = none
+
xml_space_before_self_closing = true
resharper_arrange_object_creation_when_type_not_evident_highlighting = none
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 4f351aa9c3..21d268617f 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,40 +1,49 @@
-
+
## Description
-
+
## Related Issue
-
+
+This project only accepts pull requests related to open issues.
+If suggesting a new feature or change, please discuss it in an issue first.
+If fixing a bug, there should be an issue describing it with steps to reproduce.
+Please replace "XYZ" below with the issue number that is being resolved by this
+pull request.
-
+-->
-
+Resolves #XYZ
## Motivation and Context
-
+
## How Has This Been Tested?
-
+
+Include details of your testing environment, and the tests you ran to
+see how your change affects other areas of the code, etc.
+Please describe in detail how you tested your changes.
-
+-->
## Screenshots (if appropriate):
-
+
## Checklist:
-
+
+Go over all the following points, and put an `x` in all the boxes that apply.
+If you're unsure about any of these, don't hesitate to ask. We're here to help!
+
+-->
* \[ ] My code follows the code style of this project.
* \[ ] My change requires a change to the documentation.
diff --git a/.github/actions/docker-test/action.yml b/.github/actions/docker-test/action.yml
index c7a747121f..5b8e20bba2 100644
--- a/.github/actions/docker-test/action.yml
+++ b/.github/actions/docker-test/action.yml
@@ -16,15 +16,25 @@ runs:
steps:
-
name: '[Docker Build & Test] DockerHub'
- shell: pwsh
- run: |
+ uses: nick-fields/retry@v3
+ with:
+ shell: pwsh
+ timeout_minutes: 30
+ max_attempts: 3
+ retry_on: error
+ command: |
dotnet run/docker.dll --target=DockerTest `
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic
-
name: '[Docker Build & Test] GitHub'
- shell: pwsh
- run: |
+ uses: nick-fields/retry@v3
+ with:
+ shell: pwsh
+ timeout_minutes: 30
+ max_attempts: 3
+ retry_on: error
+ command: |
dotnet run/docker.dll --target=DockerTest `
--arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} `
--docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic
diff --git a/.github/chatmodes/plan.chatmode.md b/.github/chatmodes/plan.chatmode.md
new file mode 100644
index 0000000000..57ced4af97
--- /dev/null
+++ b/.github/chatmodes/plan.chatmode.md
@@ -0,0 +1,114 @@
+---
+description: 'Strategic planning and architecture assistant focused on thoughtful analysis before implementation. Helps developers understand codebases, clarify requirements, and develop comprehensive implementation strategies.'
+tools: ['codebase', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'problems', 'search', 'searchResults', 'usages', 'vscodeAPI']
+---
+
+# Plan Mode - Strategic Planning & Architecture Assistant
+
+You are a strategic planning and architecture assistant focused on thoughtful analysis before implementation. Your primary role is to help developers understand their codebase, clarify requirements, and develop comprehensive implementation strategies.
+
+## Core Principles
+
+**Think First, Code Later**: Always prioritize understanding and planning over immediate implementation. Your goal is to help users make informed decisions about their development approach.
+
+**Information Gathering**: Start every interaction by understanding the context, requirements, and existing codebase structure before proposing any solutions.
+
+**Collaborative Strategy**: Engage in dialogue to clarify objectives, identify potential challenges, and develop the best possible approach together with the user.
+
+## Your Capabilities & Focus
+
+### Information Gathering Tools
+- **Codebase Exploration**: Use the `codebase` tool to examine existing code structure, patterns, and architecture
+- **Search & Discovery**: Use `search` and `searchResults` tools to find specific patterns, functions, or implementations across the project
+- **Usage Analysis**: Use the `usages` tool to understand how components and functions are used throughout the codebase
+- **Problem Detection**: Use the `problems` tool to identify existing issues and potential constraints
+- **Test Analysis**: Use `findTestFiles` to understand testing patterns and coverage
+- **External Research**: Use `fetch` to access external documentation and resources
+- **Repository Context**: Use `githubRepo` to understand project history and collaboration patterns
+- **VSCode Integration**: Use `vscodeAPI` and `extensions` tools for IDE-specific insights
+- **External Services**: Use MCP tools like `mcp-atlassian` for project management context and `browser-automation` for web-based research
+
+### Planning Approach
+- **Requirements Analysis**: Ensure you fully understand what the user wants to accomplish
+- **Context Building**: Explore relevant files and understand the broader system architecture
+- **Constraint Identification**: Identify technical limitations, dependencies, and potential challenges
+- **Strategy Development**: Create comprehensive implementation plans with clear steps
+- **Risk Assessment**: Consider edge cases, potential issues, and alternative approaches
+
+## Workflow Guidelines
+
+### 1. Start with Understanding
+- Ask clarifying questions about requirements and goals
+- Explore the codebase to understand existing patterns and architecture
+- Identify relevant files, components, and systems that will be affected
+- Understand the user's technical constraints and preferences
+
+### 2. Analyze Before Planning
+- Review existing implementations to understand current patterns
+- Identify dependencies and potential integration points
+- Consider the impact on other parts of the system
+- Assess the complexity and scope of the requested changes
+
+### 3. Develop Comprehensive Strategy
+- Break down complex requirements into manageable components
+- Propose a clear implementation approach with specific steps
+- Identify potential challenges and mitigation strategies
+- Consider multiple approaches and recommend the best option
+- Plan for testing, error handling, and edge cases
+
+### 4. Present Clear Plans
+- Provide detailed implementation strategies with reasoning
+- Include specific file locations and code patterns to follow
+- Suggest the order of implementation steps
+- Identify areas where additional research or decisions may be needed
+- Offer alternatives when appropriate
+
+## Best Practices
+
+### Information Gathering
+- **Be Thorough**: Read relevant files to understand the full context before planning
+- **Ask Questions**: Don't make assumptions - clarify requirements and constraints
+- **Explore Systematically**: Use directory listings and searches to discover relevant code
+- **Understand Dependencies**: Review how components interact and depend on each other
+
+### Planning Focus
+- **Architecture First**: Consider how changes fit into the overall system design
+- **Follow Patterns**: Identify and leverage existing code patterns and conventions
+- **Consider Impact**: Think about how changes will affect other parts of the system
+- **Plan for Maintenance**: Propose solutions that are maintainable and extensible
+
+### Communication
+- **Be Consultative**: Act as a technical advisor rather than just an implementer
+- **Explain Reasoning**: Always explain why you recommend a particular approach
+- **Present Options**: When multiple approaches are viable, present them with trade-offs
+- **Document Decisions**: Help users understand the implications of different choices
+
+## Interaction Patterns
+
+### When Starting a New Task
+1. **Understand the Goal**: What exactly does the user want to accomplish?
+2. **Explore Context**: What files, components, or systems are relevant?
+3. **Identify Constraints**: What limitations or requirements must be considered?
+4. **Clarify Scope**: How extensive should the changes be?
+
+### When Planning Implementation
+1. **Review Existing Code**: How is similar functionality currently implemented?
+2. **Identify Integration Points**: Where will new code connect to existing systems?
+3. **Plan Step-by-Step**: What's the logical sequence for implementation?
+4. **Consider Testing**: How can the implementation be validated?
+
+### When Facing Complexity
+1. **Break Down Problems**: Divide complex requirements into smaller, manageable pieces
+2. **Research Patterns**: Look for existing solutions or established patterns to follow
+3. **Evaluate Trade-offs**: Consider different approaches and their implications
+4. **Seek Clarification**: Ask follow-up questions when requirements are unclear
+
+## Response Style
+
+- **Conversational**: Engage in natural dialogue to understand and clarify requirements
+- **Thorough**: Provide comprehensive analysis and detailed planning
+- **Strategic**: Focus on architecture and long-term maintainability
+- **Educational**: Explain your reasoning and help users understand the implications
+- **Collaborative**: Work with users to develop the best possible solution
+
+Remember: Your role is to be a thoughtful technical advisor who helps users make informed decisions about their code. Focus on understanding, planning, and strategy development rather than immediate implementation.
diff --git a/.github/chatmodes/planner.chatmode.md b/.github/chatmodes/planner.chatmode.md
new file mode 100644
index 0000000000..baf3afb8ac
--- /dev/null
+++ b/.github/chatmodes/planner.chatmode.md
@@ -0,0 +1,14 @@
+---
+description: 'Generate an implementation plan for new features or refactoring existing code.'
+tools: ['codebase', 'fetch', 'findTestFiles', 'githubRepo', 'search', 'usages']
+---
+# Planning mode instructions
+You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code.
+Don't make any code edits, just generate a plan.
+
+The plan consists of a Markdown document that describes the implementation plan, including the following sections:
+
+* Overview: A brief description of the feature or refactoring task.
+* Requirements: A list of requirements for the feature or refactoring task.
+* Implementation Steps: A detailed list of steps to implement the feature or refactoring task.
+* Testing: A list of tests that need to be implemented to verify the feature or refactoring task.
diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml
index fb44fcd597..a0633f41d0 100644
--- a/.github/workflows/_artifacts_linux.yml
+++ b/.github/workflows/_artifacts_linux.yml
@@ -17,7 +17,7 @@ on:
env:
DOTNET_INSTALL_DIR: "./.dotnet"
DOTNET_ROLL_FORWARD: "Major"
-
+
jobs:
artifacts:
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
@@ -30,20 +30,20 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/cache-restore
-
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
name: Download nuget packages
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
-
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
name: Download native packages
with:
name: native-Linux
@@ -53,8 +53,14 @@ jobs:
uses: ./.github/actions/docker-setup
-
name: '[Test Artifacts]'
- shell: pwsh
- run: |
+ uses: nick-fields/retry@v3
+ with:
+ shell: pwsh
+ timeout_minutes: 30
+ max_attempts: 3
+ retry_on: error
+ command: |
dotnet run/artifacts.dll `
- --target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnet_version }} `
- --docker_distro=${{ matrix.docker_distro }}
\ No newline at end of file
+ --target=ArtifactsTest --arch=${{ inputs.arch }} `
+ --dotnet_version=${{ matrix.dotnet_version }} `
+ --docker_distro=${{ matrix.docker_distro }}
diff --git a/.github/workflows/_artifacts_windows.yml b/.github/workflows/_artifacts_windows.yml
index 3c0a3a4f20..31486885be 100644
--- a/.github/workflows/_artifacts_windows.yml
+++ b/.github/workflows/_artifacts_windows.yml
@@ -17,14 +17,14 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/cache-restore
-
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
name: Download nuget packages
with:
name: nuget
diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml
index b3ce787c63..835f7f8f7e 100644
--- a/.github/workflows/_build.yml
+++ b/.github/workflows/_build.yml
@@ -17,7 +17,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
@@ -29,21 +29,21 @@ jobs:
run: dotnet run/build.dll --target=Package
-
name: 'Upload nuget packages'
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: matrix.os == 'windows-2025'
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
-
name: 'Upload native packages'
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: matrix.os == 'windows-2025'
with:
name: native-${{ runner.os }}
path: ${{ github.workspace }}/artifacts/packages/native/*.zip
-
name: 'Upload native packages'
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: matrix.os != 'windows-2025'
with:
name: native-${{ runner.os }}
diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml
index 6d5d7df311..b070134d5f 100644
--- a/.github/workflows/_docker.yml
+++ b/.github/workflows/_docker.yml
@@ -30,14 +30,14 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/cache-restore
-
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
name: Download nuget packages
with:
name: nuget
diff --git a/.github/workflows/_docker_manifests.yml b/.github/workflows/_docker_manifests.yml
index 07df99a950..e3738909be 100644
--- a/.github/workflows/_docker_manifests.yml
+++ b/.github/workflows/_docker_manifests.yml
@@ -24,7 +24,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml
index 0fd502d823..ffe8340d47 100644
--- a/.github/workflows/_prepare.yml
+++ b/.github/workflows/_prepare.yml
@@ -24,7 +24,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
-
name: Cache cake frosting
id: cache-cake
@@ -40,7 +40,7 @@ jobs:
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
-
@@ -61,7 +61,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
-
name: Restore State
uses: ./.github/actions/cache-restore
diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml
index a085732074..c8af9ec576 100644
--- a/.github/workflows/_publish.yml
+++ b/.github/workflows/_publish.yml
@@ -4,7 +4,7 @@ on:
env:
DOTNET_INSTALL_DIR: "./.dotnet"
DOTNET_ROLL_FORWARD: "Major"
-
+
jobs:
publish:
name: ${{ matrix.taskName }}
@@ -21,19 +21,20 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/cache-restore
-
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
name: Download nuget packages
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
+
-
name: '[Publish]'
shell: pwsh
- run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }}
\ No newline at end of file
+ run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }}
diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml
index c3a45146dd..f12e689fc3 100644
--- a/.github/workflows/_unit_tests.yml
+++ b/.github/workflows/_unit_tests.yml
@@ -16,27 +16,32 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [windows-2025, ubuntu-24.04, macos-15]
+ os: [ windows-2025, ubuntu-24.04, macos-15 ]
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
runs-on: ${{ matrix.os }}
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/cache-restore
- -
- name: '[Unit Test]'
- shell: pwsh
- run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}
+
+ - name: '[Unit Test]'
+ uses: nick-fields/retry@v3
+ with:
+ shell: pwsh
+ timeout_minutes: 30
+ max_attempts: 3
+ retry_on: error
+ command: 'dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}'
-
name: Test Summary
uses: test-summary/action@v2.4
- if: ${{ always() && matrix.dotnet_version == '9.0' }}
+ if: always() && matrix.dotnet_version == '10.0'
with:
paths: artifacts/test-results/*.results.xml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4e26468265..0ecebfe4a8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ on:
- '!docs/**'
merge_group:
types: [checks_requested]
-
+
repository_dispatch:
types: [ ci-release ]
@@ -43,7 +43,7 @@ jobs:
prepare:
name: Prepare
uses: ./.github/workflows/_prepare.yml
-
+
build:
name: Build & Package
needs: [ prepare ]
@@ -124,7 +124,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
@@ -135,11 +135,11 @@ jobs:
uses: ./.github/actions/artifacts-restore
-
name: Attetstation
- if: ${{ github.event_name == 'repository_dispatch' }}
+ if: github.event_name == 'repository_dispatch'
uses: ./.github/actions/artifacts-attest
-
name: DockerHub Publish Readme
- if: ${{ github.event_name == 'repository_dispatch' }}
+ if: github.event_name == 'repository_dispatch'
shell: pwsh
run: dotnet run/docker.dll --target=DockerHubReadmePublish
env:
@@ -151,10 +151,10 @@ jobs:
run: dotnet run/release.dll --target=PublishRelease
-
name: '[Publish Release]'
- if: ${{ github.event_name == 'repository_dispatch' }}
- uses: peter-evans/repository-dispatch@v3
+ if: github.event_name == 'repository_dispatch'
+ uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
repository: ${{ github.repository }}
event-type: publish-release
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}'
\ No newline at end of file
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}'
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 67c9758109..1966b69e27 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -49,14 +49,15 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Initialize CodeQL
- uses: github/codeql-action/init@v3
+ uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
+ tools: linked
-
name: Cache cake frosting
@@ -68,7 +69,7 @@ jobs:
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
-
@@ -82,4 +83,4 @@ jobs:
run: dotnet run/build.dll --target=BuildPrepare --exclusive
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ uses: github/codeql-action/analyze@v4
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index a08e5717da..3c3aa34a9c 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -38,7 +38,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
@@ -72,7 +72,7 @@ jobs:
restore-keys: node-${{ runner.os }}
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
-
@@ -91,7 +91,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
@@ -130,7 +130,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
-
@@ -142,11 +142,6 @@ jobs:
run: dotnet run/docs.dll --target=GenerateSchemas
-
name: '[Publish Documentation]'
- if: ${{ github.event_name == 'repository_dispatch' }}
- shell: pwsh
- run: dotnet run/docs.dll --target=PublishDocs
- -
- name: '[Publish Documentation]'
- if: ${{ github.event_name == 'workflow_dispatch' }}
+ if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch'
shell: pwsh
run: dotnet run/docs.dll --target=PublishDocs --force
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index f05e80535c..8c2ba5f079 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -39,10 +39,10 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
-
diff --git a/.github/workflows/gittools-actions.yml b/.github/workflows/gittools-actions.yml
new file mode 100644
index 0000000000..8d5bcd04eb
--- /dev/null
+++ b/.github/workflows/gittools-actions.yml
@@ -0,0 +1,43 @@
+name: Update GitTools Actions
+
+on:
+ workflow_dispatch:
+ inputs:
+ tag-name:
+ description: 'Tag name to use for the release'
+ required: true
+ repository_dispatch:
+ types: [ publish-release ]
+
+defaults:
+ run:
+ shell: pwsh
+
+permissions:
+ contents: read
+
+jobs:
+ homebrew:
+ permissions:
+ contents: none
+ name: Update GitTools Actions
+ runs-on: ubuntu-24.04
+ steps:
+ -
+ name: Get version
+ id: get-version
+ shell: pwsh
+ run: |
+ $version = "${{ github.event.client_payload.tag }}"
+ if ($version -eq "") {
+ $version = "${{ github.event.inputs.tag-name }}"
+ }
+ "version=$version" >> $env:GITHUB_OUTPUT
+ -
+ uses: peter-evans/repository-dispatch@v4
+ name: Update GitTools Actions
+ with:
+ token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
+ repository: ${{ github.repository_owner }}/actions
+ event-type: gitversion-release-published
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get-version.outputs.version }}"}'
diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml
index 12cfa22056..3f3ee536b2 100644
--- a/.github/workflows/homebrew.yml
+++ b/.github/workflows/homebrew.yml
@@ -19,7 +19,8 @@ jobs:
name: Bump Homebrew formula
runs-on: macos-latest
steps:
- - name: Get version
+ -
+ name: Get version
id: get-version
shell: pwsh
run: |
@@ -27,7 +28,7 @@ jobs:
if ($version -eq "") {
$version = "${{ github.event.inputs.tag-name }}"
}
- "version=$version" >> $env:GITHUB_OUTPUT
+ "version=$version" >> $env:GITHUB_OUTPUT
-
uses: mislav/bump-homebrew-formula-action@v3
name: Bump Homebrew formula
@@ -40,4 +41,4 @@ jobs:
For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }}
env:
- COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
\ No newline at end of file
+ COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml
index e3918452ad..526427a09b 100644
--- a/.github/workflows/mkdocs.yml
+++ b/.github/workflows/mkdocs.yml
@@ -1,17 +1,32 @@
name: Markdown Update
on:
push:
+ branches:
+ - main
+ - 'fix/*'
+ - 'feature/*'
+ - 'poc/*'
+ - 'support/*'
+ paths:
+ - 'docs/**'
+
+ pull_request:
+ branches:
+ - main
+ - 'support/*'
+ paths:
+ - 'docs/**'
env:
DOTNET_ROLL_FORWARD: "Major"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
-
+
defaults:
run:
shell: pwsh
-
+
jobs:
docs:
name: Update Markdown (embedded snippets)
@@ -19,29 +34,36 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
+ if: github.event_name == 'push'
+ with:
+ token: ${{ secrets.PUSH_GITHUB_TOKEN }}
+ -
+ name: Checkout
+ uses: actions/checkout@v6
+ if: github.event_name == 'pull_request'
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- -
+ -
name: Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
mdsnippets --write-header false
working-directory: ${{ github.workspace }}/docs/input
- -
+ -
name: Check for changes
id: status
run: |
if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT }
- -
+ -
name: Push changes
run: |
git add --verbose .
- git config user.name 'Artur Stolear'
- git config user.email 'artur.stolear@gmail.com'
+ git config user.name 'gittools-bot'
+ git config user.email 'gittoolsbot@outlook.com'
git commit -m 'Docs changes' --allow-empty
git push --force
- if: steps.status.outputs.has_changes == '1'
\ No newline at end of file
+ if: steps.status.outputs.has_changes == '1'
diff --git a/.github/workflows/new-cli.yml b/.github/workflows/new-cli.yml
index aa466cc455..5fd7034189 100644
--- a/.github/workflows/new-cli.yml
+++ b/.github/workflows/new-cli.yml
@@ -39,10 +39,10 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
-
diff --git a/.github/workflows/public-api.yml b/.github/workflows/public-api.yml
new file mode 100644
index 0000000000..418c45f7c0
--- /dev/null
+++ b/.github/workflows/public-api.yml
@@ -0,0 +1,44 @@
+name: Mark public API as shipped
+
+on:
+ workflow_dispatch:
+ repository_dispatch:
+ types: [ publish-release ]
+
+defaults:
+ run:
+ shell: pwsh
+
+permissions:
+ contents: read
+
+jobs:
+ homebrew:
+ permissions:
+ contents: none
+ name: Mark public API as shipped
+ runs-on: ubuntu-24.04
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@v6
+ if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch'
+ with:
+ token: ${{ secrets.PUSH_GITHUB_TOKEN }}
+ -
+ name: Mark public API as shipped
+ run: ./src/mark-shipped.ps1
+ -
+ name: Check for changes
+ id: status
+ run: |
+ if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT }
+ -
+ name: Push changes
+ run: |
+ git add --verbose .
+ git config user.name 'gittools-bot'
+ git config user.email 'gittoolsbot@outlook.com'
+ git commit -m 'Mark public API as shipped' --allow-empty
+ git push --force
+ if: steps.status.outputs.has_changes == '1'
diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml
index de9cd77019..76daa8ccbf 100644
--- a/.github/workflows/qodana_analysis.yml
+++ b/.github/workflows/qodana_analysis.yml
@@ -15,18 +15,18 @@ jobs:
checks: write
steps:
-
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
-
name: Setup .NET SDK
- uses: actions/setup-dotnet@v4
+ uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
-
name: 'Qodana Scan'
- uses: jetbrains/qodana-action@v2025.1.1
+ uses: jetbrains/qodana-action@v2025.2.2
with:
args: --baseline,qodana.sarif.json
cache-default-branch-only: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ae9230ea55..521ac0f921 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,7 +10,7 @@ jobs:
steps:
-
name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
-
name: Get version
id: get-version
@@ -20,7 +20,7 @@ jobs:
$VERSION="${{ github.ref }}".Replace("refs/tags/", "")
"version=$VERSION" >> $env:GITHUB_OUTPUT
-
- uses: peter-evans/repository-dispatch@v3
+ uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
repository: ${{ github.repository }}
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 4db0930525..268a3c6c3f 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -13,7 +13,7 @@ jobs:
stale:
runs-on: ubuntu-24.04
steps:
- - uses: actions/stale@v9
+ - uses: actions/stale@v10
with:
operations-per-run: 100
# set 'stale' label
diff --git a/build/.run/Artifacts DotnetTool Test.run.xml b/build/.run/Artifacts DotnetTool Test.run.xml
index c4c33a96bc..ac637febb2 100644
--- a/build/.run/Artifacts DotnetTool Test.run.xml
+++ b/build/.run/Artifacts DotnetTool Test.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,7 +15,7 @@
-
+
diff --git a/build/.run/Artifacts Executable Test.run.xml b/build/.run/Artifacts Executable Test.run.xml
index 85538064f0..6e783555c6 100644
--- a/build/.run/Artifacts Executable Test.run.xml
+++ b/build/.run/Artifacts Executable Test.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Artifacts MsBuildCore Test.run.xml b/build/.run/Artifacts MsBuildCore Test.run.xml
index c39a0ea675..9c99fb04c5 100644
--- a/build/.run/Artifacts MsBuildCore Test.run.xml
+++ b/build/.run/Artifacts MsBuildCore Test.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,7 +15,7 @@
-
+
diff --git a/build/.run/Artifacts MsBuildFull Test.run.xml b/build/.run/Artifacts MsBuildFull Test.run.xml
index 537874156c..b7f3868d0f 100644
--- a/build/.run/Artifacts MsBuildFull Test.run.xml
+++ b/build/.run/Artifacts MsBuildFull Test.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Artifacts Native Test.run.xml b/build/.run/Artifacts Native Test.run.xml
index a36059f498..db24e6631a 100644
--- a/build/.run/Artifacts Native Test.run.xml
+++ b/build/.run/Artifacts Native Test.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,7 +15,7 @@
-
+
diff --git a/build/.run/Artifacts Prepare.run.xml b/build/.run/Artifacts Prepare.run.xml
index 2f1148d96e..2ca9aae938 100644
--- a/build/.run/Artifacts Prepare.run.xml
+++ b/build/.run/Artifacts Prepare.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,7 +15,7 @@
-
+
diff --git a/build/.run/Artifacts Test.run.xml b/build/.run/Artifacts Test.run.xml
index 2463d6a13c..74ba913fd5 100644
--- a/build/.run/Artifacts Test.run.xml
+++ b/build/.run/Artifacts Test.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,7 +15,7 @@
-
+
diff --git a/build/.run/Build Docs.run.xml b/build/.run/Build Docs.run.xml
index 43431e74bb..06a7e06e57 100644
--- a/build/.run/Build Docs.run.xml
+++ b/build/.run/Build Docs.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Build Prepare.run.xml b/build/.run/Build Prepare.run.xml
index 2e820c42fe..11b58ba567 100644
--- a/build/.run/Build Prepare.run.xml
+++ b/build/.run/Build Prepare.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Build.run.xml b/build/.run/Build.run.xml
index e178484aae..0dc4e8dcaf 100644
--- a/build/.run/Build.run.xml
+++ b/build/.run/Build.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Clean.run.xml b/build/.run/Clean.run.xml
index d1c8841cc2..a868440dcb 100644
--- a/build/.run/Clean.run.xml
+++ b/build/.run/Clean.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Code Format.run.xml b/build/.run/Code Format.run.xml
index 560927676b..1766cb3588 100644
--- a/build/.run/Code Format.run.xml
+++ b/build/.run/Code Format.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Default Artifacts.run.xml b/build/.run/Default Artifacts.run.xml
index fe2a2c7a99..e4d3a3d141 100644
--- a/build/.run/Default Artifacts.run.xml
+++ b/build/.run/Default Artifacts.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Default Build.run.xml b/build/.run/Default Build.run.xml
index 6abaa465f3..e57f500364 100644
--- a/build/.run/Default Build.run.xml
+++ b/build/.run/Default Build.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Default Config.run.xml b/build/.run/Default Config.run.xml
index 1d2cb9fab3..110139461a 100644
--- a/build/.run/Default Config.run.xml
+++ b/build/.run/Default Config.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Default Docker.run.xml b/build/.run/Default Docker.run.xml
index 461aaa85bc..679c299eaf 100644
--- a/build/.run/Default Docker.run.xml
+++ b/build/.run/Default Docker.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Default Docs.run.xml b/build/.run/Default Docs.run.xml
index b4ea267b7b..c4e4f37498 100644
--- a/build/.run/Default Docs.run.xml
+++ b/build/.run/Default Docs.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Default Publish.run.xml b/build/.run/Default Publish.run.xml
index 03f349b259..0312d93626 100644
--- a/build/.run/Default Publish.run.xml
+++ b/build/.run/Default Publish.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Docker Build.run.xml b/build/.run/Docker Build.run.xml
index ee230e7d4d..dddb517c18 100644
--- a/build/.run/Docker Build.run.xml
+++ b/build/.run/Docker Build.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Docker Manifest.run.xml b/build/.run/Docker Manifest.run.xml
index 6b6293a626..7bac96983b 100644
--- a/build/.run/Docker Manifest.run.xml
+++ b/build/.run/Docker Manifest.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Docker Publish.run.xml b/build/.run/Docker Publish.run.xml
index ea23af56ab..3bea5a43de 100644
--- a/build/.run/Docker Publish.run.xml
+++ b/build/.run/Docker Publish.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Docker Test.run.xml b/build/.run/Docker Test.run.xml
index 09ac793b19..d821ef967d 100644
--- a/build/.run/Docker Test.run.xml
+++ b/build/.run/Docker Test.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/DockerHub Readme Publish.run.xml b/build/.run/DockerHub Readme Publish.run.xml
index 4ac6c97d64..dcae856c01 100644
--- a/build/.run/DockerHub Readme Publish.run.xml
+++ b/build/.run/DockerHub Readme Publish.run.xml
@@ -17,9 +17,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Generate Schemas.run.xml b/build/.run/Generate Schemas.run.xml
index e009ddc54a..cacf21449e 100644
--- a/build/.run/Generate Schemas.run.xml
+++ b/build/.run/Generate Schemas.run.xml
@@ -7,18 +7,20 @@
-
+
+
+
+
-
+
-
\ No newline at end of file
diff --git a/build/.run/Package Archive.run.xml b/build/.run/Package Archive.run.xml
index fa6cca1b56..bea73dddb4 100644
--- a/build/.run/Package Archive.run.xml
+++ b/build/.run/Package Archive.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Package Chocolatey.run.xml b/build/.run/Package Chocolatey.run.xml
index 88b86ef25c..85c6b81350 100644
--- a/build/.run/Package Chocolatey.run.xml
+++ b/build/.run/Package Chocolatey.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Package Nuget.run.xml b/build/.run/Package Nuget.run.xml
index 841a3a4fc8..b53ba74eb4 100644
--- a/build/.run/Package Nuget.run.xml
+++ b/build/.run/Package Nuget.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Package Prepare.run.xml b/build/.run/Package Prepare.run.xml
index 9c72d75e52..37df46f54a 100644
--- a/build/.run/Package Prepare.run.xml
+++ b/build/.run/Package Prepare.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Package.run.xml b/build/.run/Package.run.xml
index ecb147deb9..28628d18e8 100644
--- a/build/.run/Package.run.xml
+++ b/build/.run/Package.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Preview Docs.run.xml b/build/.run/Preview Docs.run.xml
index d0bd79cb9e..ddd3ea3588 100644
--- a/build/.run/Preview Docs.run.xml
+++ b/build/.run/Preview Docs.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Publish Chocolatey.run.xml b/build/.run/Publish Chocolatey.run.xml
index 1dae103da1..0dc1784c12 100644
--- a/build/.run/Publish Chocolatey.run.xml
+++ b/build/.run/Publish Chocolatey.run.xml
@@ -16,9 +16,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Publish Docs.run.xml b/build/.run/Publish Docs.run.xml
index 22ceca648b..520df9453c 100644
--- a/build/.run/Publish Docs.run.xml
+++ b/build/.run/Publish Docs.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Publish Nuget.run.xml b/build/.run/Publish Nuget.run.xml
index 1e1bb97cb2..60c309b33f 100644
--- a/build/.run/Publish Nuget.run.xml
+++ b/build/.run/Publish Nuget.run.xml
@@ -16,9 +16,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Publish Release.run.xml b/build/.run/Publish Release.run.xml
index a6b1e66b5a..683971553a 100644
--- a/build/.run/Publish Release.run.xml
+++ b/build/.run/Publish Release.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/PublishCoverage.run.xml b/build/.run/PublishCoverage.run.xml
index 35d4a55936..e9b2e989db 100644
--- a/build/.run/PublishCoverage.run.xml
+++ b/build/.run/PublishCoverage.run.xml
@@ -1,7 +1,7 @@
-
+
@@ -16,9 +16,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/SetMatrix.run.xml b/build/.run/SetMatrix.run.xml
index 2ee4920e9a..b493f9b517 100644
--- a/build/.run/SetMatrix.run.xml
+++ b/build/.run/SetMatrix.run.xml
@@ -12,9 +12,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/Test.run.xml b/build/.run/Test.run.xml
index 2a2db6d92e..189aad3587 100644
--- a/build/.run/Test.run.xml
+++ b/build/.run/Test.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/UnitTest (8.0).run.xml b/build/.run/UnitTest (8.0).run.xml
index e60688bff1..dfeefaa35d 100644
--- a/build/.run/UnitTest (8.0).run.xml
+++ b/build/.run/UnitTest (8.0).run.xml
@@ -4,15 +4,21 @@
-
+
+
+
+
+
+
+
-
+
diff --git a/build/.run/UnitTest (9.0).run.xml b/build/.run/UnitTest (9.0).run.xml
index e9702af0a9..9b6dbafd7b 100644
--- a/build/.run/UnitTest (9.0).run.xml
+++ b/build/.run/UnitTest (9.0).run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/.run/UnitTest (Lts Latest).run.xml b/build/.run/UnitTest (Lts Latest).run.xml
new file mode 100644
index 0000000000..d10fff56d7
--- /dev/null
+++ b/build/.run/UnitTest (Lts Latest).run.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/.run/Validate Version.run.xml b/build/.run/Validate Version.run.xml
index 527061c25e..fc7fc77ccd 100644
--- a/build/.run/Validate Version.run.xml
+++ b/build/.run/Validate Version.run.xml
@@ -15,9 +15,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/build/CI.slnx b/build/CI.slnx
index 1d84f0ec53..3e1f7caf72 100644
--- a/build/CI.slnx
+++ b/build/CI.slnx
@@ -40,9 +40,11 @@
+
+
diff --git a/build/Directory.Build.props b/build/Directory.Build.props
index 9b2f07e792..717a7004bf 100644
--- a/build/Directory.Build.props
+++ b/build/Directory.Build.props
@@ -1,7 +1,7 @@
Exe
- net9.0
+ net10.0
$(MSBuildProjectDirectory)
..\..\run\
false
diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props
index 9a481f2275..76cf1e2a46 100644
--- a/build/Directory.Packages.props
+++ b/build/Directory.Packages.props
@@ -3,13 +3,13 @@
true
-
+
-
-
+
+
-
-
+
+
diff --git a/build/artifacts/BuildContext.cs b/build/artifacts/BuildContext.cs
index 9c3b353ede..6a1c373d95 100644
--- a/build/artifacts/BuildContext.cs
+++ b/build/artifacts/BuildContext.cs
@@ -1,12 +1,8 @@
-using Common.Utilities;
+using Common.Context;
namespace Artifacts;
-public class BuildContext(ICakeContext context) : BuildContextBase(context)
+public class BuildContext(ICakeContext context) : DockerBuildContext(context)
{
public string MsBuildConfiguration { get; } = Constants.DefaultConfiguration;
-
- public bool IsDockerOnLinux { get; set; }
-
- public IEnumerable Images { get; set; } = new List();
}
diff --git a/build/artifacts/BuildLifetime.cs b/build/artifacts/BuildLifetime.cs
index 99b5ffe177..5b74fe09c0 100644
--- a/build/artifacts/BuildLifetime.cs
+++ b/build/artifacts/BuildLifetime.cs
@@ -1,39 +1,8 @@
using Common.Lifetime;
-using Common.Utilities;
namespace Artifacts;
-public class BuildLifetime : BuildLifetimeBase
+public class BuildLifetime : DockerBuildLifetime
{
- public override void Setup(BuildContext context, ISetupContext info)
- {
- base.Setup(context, info);
-
- context.IsDockerOnLinux = context.DockerCustomCommand("info --format '{{.OSType}}'").First().Replace("'", string.Empty) == "linux";
-
- var dockerRegistry = context.Argument(Arguments.DockerRegistry, DockerRegistry.DockerHub);
- var dotnetVersion = context.Argument(Arguments.DotnetVersion, string.Empty).ToLower();
- var dockerDistro = context.Argument(Arguments.DockerDistro, string.Empty).ToLower();
-
- var versions = string.IsNullOrWhiteSpace(dotnetVersion) ? Constants.DotnetVersions : [dotnetVersion];
- var distros = string.IsNullOrWhiteSpace(dockerDistro) ? Constants.DockerDistros : [dockerDistro];
-
- var architectures = context.HasArgument(Arguments.Architecture) ? context.Arguments(Arguments.Architecture) : Constants.ArchToBuild;
- var platformArch = context.IsRunningOnAmd64() ? Architecture.Amd64 : Architecture.Arm64;
-
- var registry = dockerRegistry == DockerRegistry.DockerHub ? Constants.DockerHubRegistry : Constants.GitHubContainerRegistry;
- context.Images = from version in versions
- from distro in distros
- from arch in architectures
- select new DockerImage(distro, version, arch, registry, true);
-
- context.StartGroup("Build Setup");
-
- LogBuildInformation(context);
-
- context.Information($"IsDockerOnLinux: {context.IsDockerOnLinux}");
- context.Information($"Building for Version: {dotnetVersion}, Distro: {dockerDistro}, Architecture: {platformArch}");
-
- context.EndGroup();
- }
+ protected override bool UseBaseImage => true;
}
diff --git a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
index f4d34e623e..6551b6475b 100644
--- a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
+++ b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
@@ -19,9 +19,13 @@ public override void Run(BuildContext context)
if (context.Version == null)
return;
var version = context.Version.NugetVersion;
+ var fullSemVer = context.Version.GitVersion.FullSemVer;
var nugetSource = context.MakeAbsolute(Paths.Nuget).FullPath;
+ const int toolVersionValue = 11; // Workaround for now. It should be removed when https://github.com/cake-build/cake/issues/4658 is merged
+ var isMsBuildToolVersionValid = Enum.IsDefined(typeof(MSBuildToolVersion), toolVersionValue);
+
context.Information("\nTesting msbuild task with dotnet build\n");
foreach (var netVersion in Constants.DotnetVersions)
{
@@ -40,7 +44,27 @@ public override void Run(BuildContext context)
});
var exe = Paths.Integration.Combine("build").Combine(framework).CombineWithFilePath("app.dll");
- context.ValidateOutput("dotnet", exe.FullPath, context.Version.GitVersion.FullSemVer);
+ context.ValidateOutput("dotnet", exe.FullPath, fullSemVer);
+
+ if (!isMsBuildToolVersionValid) continue;
+
+ const MSBuildToolVersion toolVersion = (MSBuildToolVersion)toolVersionValue;
+ context.Information("\nTesting msbuild task with msbuild (for full framework)\n");
+
+ var msBuildSettings = new MSBuildSettings
+ {
+ Verbosity = Verbosity.Minimal,
+ ToolVersion = toolVersion,
+ Restore = true
+ };
+
+ msBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
+ msBuildSettings.WithProperty("RestoreSource", nugetSource);
+
+ context.MSBuild(projPath.FullPath, msBuildSettings);
+
+ var fullExe = Paths.Integration.Combine("build").CombineWithFilePath("app.exe");
+ context.ValidateOutput(fullExe.FullPath, null, fullSemVer);
}
}
}
diff --git a/build/build/Tasks/BuildPrepare.cs b/build/build/Tasks/BuildPrepare.cs
index 7ff7d4c1b0..4eff4d38c7 100644
--- a/build/build/Tasks/BuildPrepare.cs
+++ b/build/build/Tasks/BuildPrepare.cs
@@ -25,7 +25,7 @@ public override void Run(BuildContext context)
Verbosity = DotNetVerbosity.Minimal,
Configuration = Constants.DefaultConfiguration,
OutputDirectory = Paths.Tools.Combine("gitversion"),
- Framework = $"net{Constants.VersionLatest}",
+ Framework = $"net{Constants.DotnetLtsLatest}",
NoRestore = true,
});
@@ -35,7 +35,7 @@ public override void Run(BuildContext context)
Verbosity = DotNetVerbosity.Minimal,
Configuration = Constants.DefaultConfiguration,
OutputDirectory = Paths.Tools.Combine("schema"),
- Framework = $"net{Constants.VersionLatest}",
+ Framework = $"net{Constants.DotnetLtsLatest}",
NoRestore = true,
});
}
diff --git a/build/build/Tasks/Package/PackagePrepare.cs b/build/build/Tasks/Package/PackagePrepare.cs
index 7526ecffc9..096384779f 100644
--- a/build/build/Tasks/Package/PackagePrepare.cs
+++ b/build/build/Tasks/Package/PackagePrepare.cs
@@ -51,7 +51,7 @@ private static DirectoryPath PackPrepareNative(BuildContext context, string runt
var settings = new DotNetPublishSettings
{
- Framework = $"net{Constants.VersionLatest}",
+ Framework = $"net{Constants.DotnetLtsLatest}",
Runtime = runtime,
NoRestore = false,
Configuration = context.MsBuildConfiguration,
diff --git a/build/build/Tasks/Test/UnitTest.cs b/build/build/Tasks/Test/UnitTest.cs
index 727d3e940f..e66f91b2e9 100644
--- a/build/build/Tasks/Test/UnitTest.cs
+++ b/build/build/Tasks/Test/UnitTest.cs
@@ -20,6 +20,10 @@ public override void Run(BuildContext context)
var frameworks = Constants.DotnetVersions;
if (!string.IsNullOrWhiteSpace(dotnetVersion))
{
+ if (string.Equals(dotnetVersion, "lts-latest", StringComparison.OrdinalIgnoreCase))
+ {
+ dotnetVersion = Constants.DotnetLtsLatest;
+ }
if (!frameworks.Contains(dotnetVersion, StringComparer.OrdinalIgnoreCase))
{
throw new Exception($"Dotnet Target {dotnetVersion} is not supported at the moment");
diff --git a/build/common/Context/DockerBuildContext.cs b/build/common/Context/DockerBuildContext.cs
new file mode 100644
index 0000000000..d78a57642b
--- /dev/null
+++ b/build/common/Context/DockerBuildContext.cs
@@ -0,0 +1,13 @@
+using Common.Utilities;
+
+namespace Common.Context;
+
+public class DockerBuildContext(ICakeContext context) : BuildContextBase(context)
+{
+ public bool IsDockerOnLinux { get; set; }
+
+ public IEnumerable Images { get; set; } = new List();
+ public DockerRegistry DockerRegistry { get; set; }
+ public ICollection Architectures { get; set; } = new List();
+}
+
diff --git a/build/common/Lifetime/BuildLifetimeBase.cs b/build/common/Lifetime/BuildLifetimeBase.cs
index 139609d0f5..98a431ef65 100644
--- a/build/common/Lifetime/BuildLifetimeBase.cs
+++ b/build/common/Lifetime/BuildLifetimeBase.cs
@@ -32,7 +32,7 @@ public override void Setup(T context, ISetupContext info)
}
var gitVersionPath = context.GetGitVersionDotnetToolLocation();
- if (gitVersionPath is null || context.FileExists(gitVersionPath) is false)
+ if (gitVersionPath is null || !context.FileExists(gitVersionPath))
{
throw new FileNotFoundException("Failed to locate the Release build of gitversion.dll in ./tools/gitversion. Try running \"./build.ps1 -Stage build -Target BuildPrepare\"");
}
diff --git a/build/common/Lifetime/DockerBuildLifetime.cs b/build/common/Lifetime/DockerBuildLifetime.cs
new file mode 100644
index 0000000000..73e1412518
--- /dev/null
+++ b/build/common/Lifetime/DockerBuildLifetime.cs
@@ -0,0 +1,54 @@
+using Common.Context;
+using Common.Utilities;
+
+namespace Common.Lifetime;
+
+public abstract class DockerBuildLifetime : BuildLifetimeBase
+ where TContext : DockerBuildContext
+{
+ protected virtual bool UseBaseImage => false;
+
+ public override void Setup(TContext context, ISetupContext info)
+ {
+ base.Setup(context, info);
+
+ context.IsDockerOnLinux = context.DockerCustomCommand("info --format '{{.OSType}}'").First().Replace("'", string.Empty) == "linux";
+
+ var dockerRegistry = context.Argument(Arguments.DockerRegistry, DockerRegistry.DockerHub);
+ var dotnetVersion = context.Argument(Arguments.DotnetVersion, string.Empty).ToLower();
+ var dockerDistro = context.Argument(Arguments.DockerDistro, string.Empty).ToLower();
+
+ var versions = string.IsNullOrWhiteSpace(dotnetVersion)
+ ? Constants.DotnetVersions
+ : string.Equals(dotnetVersion, "lts-latest", StringComparison.OrdinalIgnoreCase)
+ ? [Constants.DotnetLtsLatest]
+ : [dotnetVersion];
+
+ var distros = string.IsNullOrWhiteSpace(dockerDistro)
+ ? Constants.DockerDistros
+ : string.Equals(dockerDistro, "distro-latest", StringComparison.OrdinalIgnoreCase)
+ ? [Constants.AlpineLatest]
+ : [dockerDistro];
+
+ var architectures = context.HasArgument(Arguments.Architecture) ? context.Arguments(Arguments.Architecture) : Constants.ArchToBuild;
+ var platformArch = context.IsRunningOnAmd64() ? Architecture.Amd64 : Architecture.Arm64;
+
+ var registry = dockerRegistry == DockerRegistry.DockerHub ? Constants.DockerHubRegistry : Constants.GitHubContainerRegistry;
+
+ context.DockerRegistry = dockerRegistry;
+ context.Architectures = architectures;
+ context.Images = from version in versions
+ from distro in distros
+ from arch in architectures
+ select new DockerImage(distro, version, arch, registry, UseBaseImage);
+
+ context.StartGroup("Build Setup");
+
+ LogBuildInformation(context);
+
+ context.Information($"IsDockerOnLinux: {context.IsDockerOnLinux}");
+ context.Information($"Building for Version: {dotnetVersion}, Distro: {dockerDistro}, Architecture: {platformArch}");
+ context.EndGroup();
+ }
+}
+
diff --git a/build/common/Utilities/Constants.cs b/build/common/Utilities/Constants.cs
index ea6033db46..2a6ad5f6ff 100644
--- a/build/common/Utilities/Constants.cs
+++ b/build/common/Utilities/Constants.cs
@@ -6,8 +6,8 @@ public static class Constants
public const string RepoOwner = "GitTools";
public const string Repository = "GitVersion";
- public const string VersionLatest = "8.0";
- public static readonly string[] DotnetVersions = [VersionLatest, "9.0"];
+ public const string DotnetLtsLatest = "10.0";
+ public static readonly string[] DotnetVersions = [DotnetLtsLatest, "9.0", "8.0"];
public const string DefaultBranch = "main";
public const string DefaultConfiguration = "Release";
@@ -24,18 +24,18 @@ public static class Constants
public const string GitHubContainerRegistry = "ghcr.io";
public static readonly string[] DockerRegistries = [DockerHub, GitHub];
- public const string AlpineLatest = "alpine.3.21";
- public const string CentosStreamLatest = "centos.stream.9";
+ public const string AlpineLatest = "alpine.3.22";
+ public const string CentosLatest = "centos.stream.9";
public const string DebianLatest = "debian.12";
- public const string FedoraLatest = "fedora.41";
+ public const string FedoraLatest = "fedora.42";
public const string UbuntuLatest = "ubuntu.24.04";
- public const string DockerDistroLatest = DebianLatest;
+ public const string DockerDistroLatest = UbuntuLatest;
public static readonly string[] DockerDistros =
[
AlpineLatest,
- CentosStreamLatest,
+ CentosLatest,
DebianLatest,
FedoraLatest,
UbuntuLatest,
diff --git a/build/common/Utilities/ContextExtensions.cs b/build/common/Utilities/ContextExtensions.cs
index fc5c564072..049420f969 100644
--- a/build/common/Utilities/ContextExtensions.cs
+++ b/build/common/Utilities/ContextExtensions.cs
@@ -180,7 +180,7 @@ public static string GetRepositoryName(this ICakeContext context)
private static void EndGroup(this IAzurePipelinesCommands _, ICakeContext context) => context.Information("##[endgroup]");
public static FilePath? GetGitVersionToolLocation(this ICakeContext context) =>
- context.GetFiles($"src/GitVersion.App/bin/{Constants.DefaultConfiguration}/net{Constants.VersionLatest}/gitversion.dll").SingleOrDefault();
+ context.GetFiles($"src/GitVersion.App/bin/{Constants.DefaultConfiguration}/net{Constants.DotnetLtsLatest}/gitversion.dll").SingleOrDefault();
public static FilePath? GetGitVersionDotnetToolLocation(this ICakeContext context) =>
context.MakeAbsolute(Paths.Tools.Combine("gitversion").CombineWithFilePath("gitversion.dll"));
diff --git a/build/common/Utilities/DockerContextExtensions.cs b/build/common/Utilities/DockerContextExtensions.cs
index 06ab4de0ff..0c8443c1f8 100644
--- a/build/common/Utilities/DockerContextExtensions.cs
+++ b/build/common/Utilities/DockerContextExtensions.cs
@@ -210,7 +210,7 @@ private static IEnumerable GetDockerTags(this BuildContextBase context,
$"{name}:{context.Version.SemVersion}-{distro}-{targetFramework}",
};
- if (distro == Constants.DockerDistroLatest && targetFramework == Constants.VersionLatest)
+ if (distro == Constants.DockerDistroLatest && targetFramework == Constants.DotnetLtsLatest)
{
tags.Add($"{name}:{context.Version.SemVersion}");
diff --git a/build/docker/BuildContext.cs b/build/docker/BuildContext.cs
index 232325c31b..6c00a3458b 100644
--- a/build/docker/BuildContext.cs
+++ b/build/docker/BuildContext.cs
@@ -1,14 +1,9 @@
-using Common.Utilities;
+using Common.Context;
using Docker.Utilities;
namespace Docker;
-public class BuildContext(ICakeContext context) : BuildContextBase(context)
+public class BuildContext(ICakeContext context) : DockerBuildContext(context)
{
public Credentials? Credentials { get; set; }
- public bool IsDockerOnLinux { get; set; }
-
- public IEnumerable Images { get; set; } = new List();
- public DockerRegistry DockerRegistry { get; set; }
- public ICollection Architectures { get; set; } = new List();
}
diff --git a/build/docker/BuildLifetime.cs b/build/docker/BuildLifetime.cs
index a518c7b6b2..2097f3b333 100644
--- a/build/docker/BuildLifetime.cs
+++ b/build/docker/BuildLifetime.cs
@@ -1,44 +1,14 @@
using Common.Lifetime;
-using Common.Utilities;
using Docker.Utilities;
namespace Docker;
-public class BuildLifetime : BuildLifetimeBase
+public class BuildLifetime : DockerBuildLifetime
{
public override void Setup(BuildContext context, ISetupContext info)
{
base.Setup(context, info);
context.Credentials = Credentials.GetCredentials(context);
-
- context.IsDockerOnLinux = context.DockerCustomCommand("info --format '{{.OSType}}'").First().Replace("'", "") == "linux";
-
- var dockerRegistry = context.Argument(Arguments.DockerRegistry, DockerRegistry.DockerHub);
- var dotnetVersion = context.Argument(Arguments.DotnetVersion, string.Empty).ToLower();
- var dockerDistro = context.Argument(Arguments.DockerDistro, string.Empty).ToLower();
-
- var versions = string.IsNullOrWhiteSpace(dotnetVersion) ? Constants.DotnetVersions : [dotnetVersion];
- var distros = string.IsNullOrWhiteSpace(dockerDistro) ? Constants.DockerDistros : [dockerDistro];
-
- var architectures = context.HasArgument(Arguments.Architecture) ? context.Arguments(Arguments.Architecture) : Constants.ArchToBuild;
- var platformArch = context.IsRunningOnAmd64() ? Architecture.Amd64 : Architecture.Arm64;
-
- var registry = dockerRegistry == DockerRegistry.DockerHub ? Constants.DockerHubRegistry : Constants.GitHubContainerRegistry;
-
- context.DockerRegistry = dockerRegistry;
- context.Architectures = architectures;
- context.Images = from version in versions
- from distro in distros
- from arch in architectures
- select new DockerImage(distro, version, arch, registry, false);
-
- context.StartGroup("Build Setup");
-
- LogBuildInformation(context);
-
- context.Information($"IsDockerOnLinux: {context.IsDockerOnLinux}");
- context.Information($"Building for Version: {dotnetVersion}, Distro: {dockerDistro}, Architecture: {platformArch}");
- context.EndGroup();
}
}
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile
index 45891b67c8..aa95e656a6 100644
--- a/build/docker/Dockerfile
+++ b/build/docker/Dockerfile
@@ -1,7 +1,7 @@
ARG REGISTRY='docker.io'
ARG DISTRO='debian.12'
ARG DOTNET_VERSION='8.0'
-ARG VERSION='5.12.0'
+ARG VERSION='6.4.0'
FROM $REGISTRY/gittools/build-images:$DISTRO-sdk-$DOTNET_VERSION as installer
ARG nugetFolder
diff --git a/build/docker/Tasks/DockerHubReadmePublish.cs b/build/docker/Tasks/DockerHubReadmePublish.cs
index 01ce452478..1cb840118c 100644
--- a/build/docker/Tasks/DockerHubReadmePublish.cs
+++ b/build/docker/Tasks/DockerHubReadmePublish.cs
@@ -57,7 +57,7 @@ private static string GetReadmeContent(BuildContextBase context)
ArgumentNullException.ThrowIfNull(context.Version);
var version = context.Version.GitVersion.MajorMinorPatch;
const string distro = Constants.AlpineLatest;
- const string dotnetVersion = Constants.VersionLatest;
+ const string dotnetVersion = Constants.DotnetLtsLatest;
var tag = $"{version}-{distro}-{dotnetVersion}";
// language=markdown
var readme = $"""
diff --git a/build/publish/Tasks/PublishNuget.cs b/build/publish/Tasks/PublishNuget.cs
index 59649a35af..28b177f0d7 100644
--- a/build/publish/Tasks/PublishNuget.cs
+++ b/build/publish/Tasks/PublishNuget.cs
@@ -1,3 +1,5 @@
+using System.Net.Http.Headers;
+using System.Text.Json;
using Cake.Common.Tools.DotNet.NuGet.Push;
using Common.Utilities;
@@ -10,7 +12,7 @@ public class PublishNuget : FrostingTask;
[TaskName(nameof(PublishNugetInternal))]
[TaskDescription("Publish nuget packages")]
-public class PublishNugetInternal : FrostingTask
+public class PublishNugetInternal : AsyncFrostingTask
{
public override bool ShouldRun(BuildContext context)
{
@@ -21,7 +23,7 @@ public override bool ShouldRun(BuildContext context)
return shouldRun;
}
- public override void Run(BuildContext context)
+ public override async Task RunAsync(BuildContext context)
{
// publish to github packages for commits on main and on original repo
if (context.IsInternalPreRelease)
@@ -32,9 +34,11 @@ public override void Run(BuildContext context)
{
throw new InvalidOperationException("Could not resolve NuGet GitHub Packages API key.");
}
+
PublishToNugetRepo(context, apiKey, Constants.GithubPackagesUrl);
context.EndGroup();
}
+
// publish to nuget.org for tagged releases
if (context.IsStableRelease || context.IsTaggedPreRelease)
{
@@ -44,10 +48,14 @@ public override void Run(BuildContext context)
{
throw new InvalidOperationException("Could not resolve NuGet org API key.");
}
+
PublishToNugetRepo(context, apiKey, Constants.NugetOrgUrl);
context.EndGroup();
}
+
+ await Task.CompletedTask;
}
+
private static void PublishToNugetRepo(BuildContext context, string apiKey, string apiUrl)
{
ArgumentNullException.ThrowIfNull(context.Version);
@@ -55,12 +63,120 @@ private static void PublishToNugetRepo(BuildContext context, string apiKey, stri
foreach (var (packageName, filePath, _) in context.Packages.Where(x => !x.IsChocoPackage))
{
context.Information($"Package {packageName}, version {nugetVersion} is being published.");
- context.DotNetNuGetPush(filePath.FullPath, new DotNetNuGetPushSettings
- {
- ApiKey = apiKey,
- Source = apiUrl,
- SkipDuplicate = true
- });
+ context.DotNetNuGetPush(filePath.FullPath,
+ new DotNetNuGetPushSettings
+ {
+ ApiKey = apiKey,
+ Source = apiUrl,
+ SkipDuplicate = true
+ });
+ }
+ }
+
+ private static async Task GetNugetApiKey(BuildContext context)
+ {
+ try
+ {
+ var oidcToken = await GetGitHubOidcToken(context);
+ var apiKey = await ExchangeOidcTokenForApiKey(oidcToken);
+
+ context.Information($"Successfully exchanged OIDC token for NuGet API key.");
+ return apiKey;
+ }
+ catch (HttpRequestException ex)
+ {
+ context.Error($"Network error while retrieving NuGet API key: {ex.Message}");
+ return null;
+ }
+ catch (InvalidOperationException ex)
+ {
+ context.Error($"Invalid operation while retrieving NuGet API key: {ex.Message}");
+ return null;
+ }
+ catch (JsonException ex)
+ {
+ context.Error($"JSON parsing error while retrieving NuGet API key: {ex.Message}");
+ return null;
+ }
+ }
+
+ private static async Task GetGitHubOidcToken(BuildContext context)
+ {
+ const string nugetAudience = "https://www.nuget.org";
+
+ var oidcRequestToken = context.Environment.GetEnvironmentVariable("ACTIONS_ID_TOKEN_REQUEST_TOKEN");
+ var oidcRequestUrl = context.Environment.GetEnvironmentVariable("ACTIONS_ID_TOKEN_REQUEST_URL");
+
+ if (string.IsNullOrEmpty(oidcRequestToken) || string.IsNullOrEmpty(oidcRequestUrl))
+ throw new InvalidOperationException("Missing GitHub OIDC request environment variables.");
+
+ var tokenUrl = $"{oidcRequestUrl}&audience={Uri.EscapeDataString(nugetAudience)}";
+ context.Information($"Requesting GitHub OIDC token from: {tokenUrl}");
+
+ using var http = new HttpClient();
+ http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", oidcRequestToken);
+
+ var responseMessage = await http.GetAsync(tokenUrl);
+ var tokenBody = await responseMessage.Content.ReadAsStringAsync();
+
+ if (!responseMessage.IsSuccessStatusCode)
+ throw new Exception("Failed to retrieve OIDC token from GitHub.");
+
+ using var tokenDoc = JsonDocument.Parse(tokenBody);
+ return ParseJsonProperty(tokenDoc, "value", "Failed to retrieve OIDC token from GitHub.");
+ }
+
+ private static async Task ExchangeOidcTokenForApiKey(string oidcToken)
+ {
+ const string nugetUsername = "gittoolsbot";
+ const string nugetTokenServiceUrl = "https://www.nuget.org/api/v2/token";
+
+ var requestBody = JsonSerializer.Serialize(new { username = nugetUsername, tokenType = "ApiKey" });
+
+ using var tokenServiceHttp = new HttpClient();
+ tokenServiceHttp.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", oidcToken);
+ tokenServiceHttp.DefaultRequestHeaders.UserAgent.ParseAdd("nuget/login-action");
+ using var content = new StringContent(requestBody, Encoding.UTF8, "application/json");
+
+ var responseMessage = await tokenServiceHttp.PostAsync(nugetTokenServiceUrl, content);
+ var exchangeBody = await responseMessage.Content.ReadAsStringAsync();
+
+ if (!responseMessage.IsSuccessStatusCode)
+ {
+ var errorMessage = BuildErrorMessage((int)responseMessage.StatusCode, exchangeBody);
+ throw new Exception(errorMessage);
}
+
+ using var respDoc = JsonDocument.Parse(exchangeBody);
+ return ParseJsonProperty(respDoc, "apiKey", "Response did not contain \"apiKey\".");
+ }
+
+ private static string ParseJsonProperty(JsonDocument document, string propertyName, string errorMessage)
+ {
+ if (!document.RootElement.TryGetProperty(propertyName, out var property) ||
+ property.ValueKind != JsonValueKind.String)
+ throw new Exception(errorMessage);
+
+ return property.GetString() ?? throw new Exception(errorMessage);
+ }
+
+ private static string BuildErrorMessage(int statusCode, string responseBody)
+ {
+ var errorMessage = $"Token exchange failed ({statusCode})";
+ try
+ {
+ using var errDoc = JsonDocument.Parse(responseBody);
+ errorMessage +=
+ errDoc.RootElement.TryGetProperty("error", out var errProp) &&
+ errProp.ValueKind == JsonValueKind.String
+ ? $": {errProp.GetString()}"
+ : $": {responseBody}";
+ }
+ catch (Exception)
+ {
+ errorMessage += $": {responseBody}";
+ }
+
+ return errorMessage;
}
}
diff --git a/docs/input/_Bottom.cshtml b/docs/input/_Bottom.cshtml
index a83a4b7d76..348bc073e6 100644
--- a/docs/input/_Bottom.cshtml
+++ b/docs/input/_Bottom.cshtml
@@ -1,10 +1,3 @@
-@* disable gitter sidecar - https://github.com/matrix-org/matrix-public-archive/issues/157 *@
-@*
- *@
diff --git a/docs/input/assets/css/override.less b/docs/input/assets/css/override.less
index 44b3897492..b5b943276c 100644
--- a/docs/input/assets/css/override.less
+++ b/docs/input/assets/css/override.less
@@ -105,10 +105,6 @@ body.layout-boxed .top-banner,
font-size: 50px;
}
-.gitter-open-chat-button {
- background-color: @purple;
-}
-
main {
font-size: 2rem;
}
diff --git a/docs/input/docs/usage/cli/arguments.md b/docs/input/docs/usage/cli/arguments.md
index a406ca76a0..d873130986 100644
--- a/docs/input/docs/usage/cli/arguments.md
+++ b/docs/input/docs/usage/cli/arguments.md
@@ -24,7 +24,8 @@ GitVersion [path]
path The directory containing .git. If not defined current
directory is used. (Must be first argument)
/version Displays the version of GitVersion
- /diag Runs GitVersion with additional diagnostic information
+ /diag Runs GitVersion with additional diagnostic information;
+ also needs the '/l' argument to specify a logfile or stdout
(requires git.exe to be installed)
/h or /? Shows Help
@@ -41,7 +42,7 @@ GitVersion [path]
Supports C# format strings - see [Format Strings](/docs/reference/custom-formatting) for details.
E.g. /output json /format {SemVer} - will output `1.2.3+beta.4`
/output json /format {Major}.{Minor} - will output `1.2`
- /l Path to logfile.
+ /l Path to logfile; specify 'console' to emit to stdout.
/config Path to config file (defaults to GitVersion.yml, GitVersion.yaml, .GitVersion.yml or .GitVersion.yaml)
/showconfig Outputs the effective GitVersion config (defaults + custom
from GitVersion.yml, GitVersion.yaml, .GitVersion.yml or .GitVersion.yaml) in yaml format
@@ -66,7 +67,7 @@ GitVersion [path]
the git repo and update them
/updateprojectfiles
Will recursively search for all project files
- (.csproj/.vbproj/.fsproj) files in the git repo and update
+ (.csproj/.vbproj/.fsproj/.sqlproj) files in the git repo and update
them
Note: This is only compatible with the newer Sdk projects
/ensureassemblyinfo
diff --git a/docs/input/docs/usage/msbuild.md b/docs/input/docs/usage/msbuild.md
index 5cacea82fd..b183cdf278 100644
--- a/docs/input/docs/usage/msbuild.md
+++ b/docs/input/docs/usage/msbuild.md
@@ -239,7 +239,7 @@ If you want to override the target framework that GitVersion uses to determine t
```xml
...
- net8.0
+ net10.0
...
```
diff --git a/global.json b/global.json
index 675c5be561..0845f26b4e 100644
--- a/global.json
+++ b/global.json
@@ -5,6 +5,6 @@
"src"
],
"sdk": {
- "version": "9.0.304"
+ "version": "10.0.100"
}
}
diff --git a/new-cli/.run/Calculate.run.xml b/new-cli/.run/Calculate.run.xml
index 018cb7f4fc..49ed2806d4 100644
--- a/new-cli/.run/Calculate.run.xml
+++ b/new-cli/.run/Calculate.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Config Help.run.xml b/new-cli/.run/Config Help.run.xml
index 4e0be82dd7..c1364f1f17 100644
--- a/new-cli/.run/Config Help.run.xml
+++ b/new-cli/.run/Config Help.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Config Init.run.xml b/new-cli/.run/Config Init.run.xml
index f188a379c1..d23d840cf4 100644
--- a/new-cli/.run/Config Init.run.xml
+++ b/new-cli/.run/Config Init.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Config Show.run.xml b/new-cli/.run/Config Show.run.xml
index 72e1fdcd29..2f42e2fb96 100644
--- a/new-cli/.run/Config Show.run.xml
+++ b/new-cli/.run/Config Show.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Help.run.xml b/new-cli/.run/Help.run.xml
index 1baa8e5ef1..0e04d9b19b 100644
--- a/new-cli/.run/Help.run.xml
+++ b/new-cli/.run/Help.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Normalize.run.xml b/new-cli/.run/Normalize.run.xml
index f77ee611de..409877c7bd 100644
--- a/new-cli/.run/Normalize.run.xml
+++ b/new-cli/.run/Normalize.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Output AssemblyInfo.run.xml b/new-cli/.run/Output AssemblyInfo.run.xml
index 514f75ccfe..9c0fec9e66 100644
--- a/new-cli/.run/Output AssemblyInfo.run.xml
+++ b/new-cli/.run/Output AssemblyInfo.run.xml
@@ -1,6 +1,6 @@
-
+
@@ -12,9 +12,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/new-cli/.run/Output Help.run.xml b/new-cli/.run/Output Help.run.xml
index eb86159ea7..88eee97bf0 100644
--- a/new-cli/.run/Output Help.run.xml
+++ b/new-cli/.run/Output Help.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Output Project.run.xml b/new-cli/.run/Output Project.run.xml
index 23976608fd..eaa5556d42 100644
--- a/new-cli/.run/Output Project.run.xml
+++ b/new-cli/.run/Output Project.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/Output Wix.run.xml b/new-cli/.run/Output Wix.run.xml
index 7c35b9079a..b1deb9978b 100644
--- a/new-cli/.run/Output Wix.run.xml
+++ b/new-cli/.run/Output Wix.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/.run/TestCommand.run.xml b/new-cli/.run/TestCommand.run.xml
index 6d8c05c0fb..1b005c19e9 100644
--- a/new-cli/.run/TestCommand.run.xml
+++ b/new-cli/.run/TestCommand.run.xml
@@ -1,23 +1,21 @@
-
+
-
-
+
-
-
-
-
+
+
+
diff --git a/new-cli/.run/Tester.run.xml b/new-cli/.run/Tester.run.xml
index d59e277cea..8c1cfab800 100644
--- a/new-cli/.run/Tester.run.xml
+++ b/new-cli/.run/Tester.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
-
+
+
+
+
-
-
+
+
diff --git a/new-cli/.run/Version.run.xml b/new-cli/.run/Version.run.xml
index 1c5607e906..9db7b44afd 100644
--- a/new-cli/.run/Version.run.xml
+++ b/new-cli/.run/Version.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
-
-
+
+
+
diff --git a/new-cli/Directory.Build.props b/new-cli/Directory.Build.props
index 986cfabbd7..acf633afc1 100644
--- a/new-cli/Directory.Build.props
+++ b/new-cli/Directory.Build.props
@@ -1,12 +1,12 @@
- net9.0
+ net10.0
GitVersion
latest
enable
enable
- 8625;2254;IDE0005
+ $(NoWarn);CS8625;CS2254;IDE0005
en
true
diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props
index 28ead80bbf..8a92219fa2 100644
--- a/new-cli/Directory.Packages.props
+++ b/new-cli/Directory.Packages.props
@@ -6,32 +6,32 @@
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs b/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs
new file mode 100644
index 0000000000..9f1c837ecf
--- /dev/null
+++ b/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs
@@ -0,0 +1,14 @@
+using Microsoft.CodeAnalysis.Testing;
+
+namespace GitVersion.Cli.Generator.Tests;
+
+public static class Extensions
+{
+ private static readonly Lazy LazyNet100 = new(() =>
+ new("net10.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), Path.Combine("ref", "net10.0")));
+
+ extension(ReferenceAssemblies.Net)
+ {
+ public static ReferenceAssemblies Net100 => LazyNet100.Value;
+ }
+}
diff --git a/new-cli/GitVersion.Cli.Generator.Tests/GitVersion.Cli.Generator.Tests.csproj b/new-cli/GitVersion.Cli.Generator.Tests/GitVersion.Cli.Generator.Tests.csproj
index 13dd134bbf..9478d94c71 100644
--- a/new-cli/GitVersion.Cli.Generator.Tests/GitVersion.Cli.Generator.Tests.csproj
+++ b/new-cli/GitVersion.Cli.Generator.Tests/GitVersion.Cli.Generator.Tests.csproj
@@ -1,6 +1,17 @@

+
+ true
+ true
+
+
+ true
+
+ Exe
GitVersion.Cli.Generator.Tests
false
@@ -10,7 +21,6 @@
-
diff --git a/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs b/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs
index 6e3775e48d..ef1e150bcf 100644
--- a/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs
+++ b/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs
@@ -252,7 +252,7 @@ public async Task ValidateGeneratedCommandImplementation()
(generatorType,"RootCommandImpl.g.cs", ExpectedRootCommandImplText),
(generatorType,"CliAppImpl.g.cs", ExpectedCliAppImplText),
},
- ReferenceAssemblies = ReferenceAssemblies.Net.Net90,
+ ReferenceAssemblies = ReferenceAssemblies.Net.Net100,
AdditionalReferences =
{
MetadataReference.CreateFromFile(typeof(ILogger).Assembly.Location),
diff --git a/new-cli/GitVersion.Cli.Generator/RoslynExtensions.cs b/new-cli/GitVersion.Cli.Generator/RoslynExtensions.cs
index fe83125599..d4eef6817e 100644
--- a/new-cli/GitVersion.Cli.Generator/RoslynExtensions.cs
+++ b/new-cli/GitVersion.Cli.Generator/RoslynExtensions.cs
@@ -2,30 +2,36 @@ namespace GitVersion;
public static class RoslynExtensions
{
- private static IEnumerable GetBaseTypesAndThis(this ITypeSymbol type)
+ extension(ITypeSymbol type)
{
- var current = type;
- while (current != null)
+ private IEnumerable GetBaseTypesAndThis()
{
- yield return current;
- current = current.BaseType;
+ var current = type;
+ while (current != null)
+ {
+ yield return current;
+ current = current.BaseType;
+ }
}
- }
- public static IEnumerable GetBaseTypes(this ITypeSymbol type)
- {
- var current = type.BaseType;
- while (current != null)
+ public IEnumerable GetBaseTypes()
{
- yield return current;
- current = current.BaseType;
+ var current = type.BaseType;
+ while (current != null)
+ {
+ yield return current;
+ current = current.BaseType;
+ }
}
- }
- public static IEnumerable GetAllMembers(this ITypeSymbol type) where T : ISymbol
- => type.GetBaseTypesAndThis().SelectMany(n => n.GetMembers().OfType());
+ public IEnumerable GetAllMembers() where T : ISymbol
+ => type.GetBaseTypesAndThis().SelectMany(n => n.GetMembers().OfType());
+ }
- public static AttributeData? GetAttributeData(this ISymbol namedType, string fullName)
- => namedType.GetAttributes()
- .SingleOrDefault(a => a.AttributeClass?.OriginalDefinition.ToDisplayString() == fullName);
+ extension(ISymbol namedType)
+ {
+ public AttributeData? GetAttributeData(string fullName)
+ => namedType.GetAttributes()
+ .SingleOrDefault(a => a.AttributeClass?.OriginalDefinition.ToDisplayString() == fullName);
+ }
}
diff --git a/new-cli/GitVersion.Core.Libgit2Sharp/GitVersion.Core.Libgit2Sharp.csproj b/new-cli/GitVersion.Core.Libgit2Sharp/GitVersion.Core.Libgit2Sharp.csproj
index 4e8f95ddc5..a42d02992f 100644
--- a/new-cli/GitVersion.Core.Libgit2Sharp/GitVersion.Core.Libgit2Sharp.csproj
+++ b/new-cli/GitVersion.Core.Libgit2Sharp/GitVersion.Core.Libgit2Sharp.csproj
@@ -5,61 +5,13 @@
-
+
-
- Git\Branch.cs
-
-
- Git\BranchCollection.cs
-
-
- Git\Commit.cs
-
-
- Git\CommitCollection.cs
-
-
- Git\GitObject.cs
-
-
- Git\GitRepository.cs
-
-
- Git\ObjectId.cs
-
-
- Git\Reference.cs
-
-
- Git\ReferenceCollection.cs
-
-
- Git\RefSpec.cs
-
-
- Git\RefSpecCollection.cs
-
-
- Git\Remote.cs
-
-
- Git\RemoteCollection.cs
-
-
- Git\RepositoryExtensions.cs
-
-
- Git\Tag.cs
-
-
- Git\TagCollection.cs
-
-
- Git\TreeChanges.cs
-
+
+
+
diff --git a/new-cli/GitVersion.Core/Extensions/ServiceCollectionExtensions.cs b/new-cli/GitVersion.Core/Extensions/ServiceCollectionExtensions.cs
index e7e5ac36a9..0b9bfdf52a 100644
--- a/new-cli/GitVersion.Core/Extensions/ServiceCollectionExtensions.cs
+++ b/new-cli/GitVersion.Core/Extensions/ServiceCollectionExtensions.cs
@@ -6,18 +6,21 @@ namespace GitVersion.Extensions;
public static class ServiceCollectionExtensions
{
- public static IServiceCollection RegisterModules(this IServiceCollection services, IEnumerable gitVersionModules)
- => gitVersionModules.Aggregate(services, (current, gitVersionModule) => gitVersionModule.RegisterTypes(current));
-
- public static IServiceCollection RegisterLogging(this IServiceCollection services)
+ extension(IServiceCollection services)
{
- services.AddLogging(builder =>
+ public IServiceCollection RegisterModules(IEnumerable gitVersionModules)
+ => gitVersionModules.Aggregate(services, (current, gitVersionModule) => gitVersionModule.RegisterTypes(current));
+
+ public IServiceCollection RegisterLogging()
{
- var logger = CreateLogger();
- builder.AddSerilog(logger, dispose: true);
- });
+ services.AddLogging(builder =>
+ {
+ var logger = CreateLogger();
+ builder.AddSerilog(logger, dispose: true);
+ });
- return services;
+ return services;
+ }
}
private static Serilog.Core.Logger CreateLogger()
diff --git a/package-lock.json b/package-lock.json
index b2349ae19b..7d0d29f92e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -254,27 +254,25 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz",
- "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
+ "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"dev": true,
+ "license": "MIT",
"peer": true,
- "dependencies": {
- "regenerator-runtime": "^0.13.4"
- },
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/runtime-corejs3": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz",
- "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.4.tgz",
+ "integrity": "sha512-h7iEYiW4HebClDEhtvFObtPmIvrd1SSfpI9EhOeKk4CtIK/ngBWFpuhCzhdmRKtg71ylcue+9I6dv54XYO1epQ==",
"dev": true,
+ "license": "MIT",
"peer": true,
"dependencies": {
- "core-js-pure": "^3.20.2",
- "regenerator-runtime": "^0.13.4"
+ "core-js-pure": "^3.43.0"
},
"engines": {
"node": ">=6.9.0"
@@ -338,6 +336,7 @@
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"string-width": "^5.1.2",
"string-width-cjs": "npm:string-width@^4.2.0",
@@ -355,6 +354,7 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
@@ -408,10 +408,11 @@
}
},
"node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
@@ -458,6 +459,7 @@
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
"dev": true,
+ "license": "MIT",
"optional": true,
"engines": {
"node": ">=14"
@@ -904,10 +906,11 @@
"dev": true
},
"node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
+ "license": "MIT",
"peer": true,
"dependencies": {
"balanced-match": "^1.0.0",
@@ -1234,11 +1237,12 @@
}
},
"node_modules/core-js-pure": {
- "version": "3.20.2",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.2.tgz",
- "integrity": "sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg==",
+ "version": "3.47.0",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.47.0.tgz",
+ "integrity": "sha512-BcxeDbzUrRnXGYIVAGFtcGQVNpFcUhVjr6W7F8XktvQW2iJP9e66GP6xdKotCRFlrxBvNIBrhwKteRXqMV86Nw==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"peer": true,
"funding": {
"type": "opencollective",
@@ -1246,10 +1250,11 @@
}
},
"node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
@@ -2810,15 +2815,6 @@
"node": "^16.14.0 || >=18.0.0"
}
},
- "node_modules/hosted-git-info/node_modules/lru-cache": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
- "dev": true,
- "engines": {
- "node": "14 || >=16.14"
- }
- },
"node_modules/html-url-attributes": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz",
@@ -3111,6 +3107,7 @@
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -3312,16 +3309,14 @@
"dev": true
},
"node_modules/jackspeak": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
- "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/cliui": "^8.0.2"
},
- "engines": {
- "node": ">=14"
- },
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
@@ -3336,9 +3331,9 @@
"dev": true
},
"node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true,
"peer": true,
"dependencies": {
@@ -3511,6 +3506,13 @@
"node": ">=8"
}
},
+ "node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "dev": true,
+ "license": "ISC"
+ },
"node_modules/markdown-extensions": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz",
@@ -4589,10 +4591,11 @@
"dev": true
},
"node_modules/minipass": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
- "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
"dev": true,
+ "license": "ISC",
"engines": {
"node": ">=16 || 14 >=14.17"
}
@@ -4975,6 +4978,13 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/package-json-from-dist": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
+ "dev": true,
+ "license": "BlueOak-1.0.0"
+ },
"node_modules/parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -5182,30 +5192,22 @@
"peer": true
},
"node_modules/path-scurry": {
- "version": "1.10.1",
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "lru-cache": "^9.1.1 || ^10.0.0",
+ "lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
},
"engines": {
- "node": ">=16 || 14 >=14.17"
+ "node": ">=16 || 14 >=14.18"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/path-scurry/node_modules/lru-cache": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
- "dev": true,
- "engines": {
- "node": "14 || >=16.14"
- }
- },
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
@@ -5392,13 +5394,6 @@
"node": ">=8.10.0"
}
},
- "node_modules/regenerator-runtime": {
- "version": "0.13.9",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
- "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
- "dev": true,
- "peer": true
- },
"node_modules/regexp.prototype.flags": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz",
@@ -13805,6 +13800,7 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -13819,6 +13815,7 @@
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -13827,13 +13824,15 @@
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/string-width-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
@@ -13930,6 +13929,7 @@
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
@@ -13942,6 +13942,7 @@
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -14225,41 +14226,42 @@
"dev": true
},
"node_modules/unified-engine/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/unified-engine/node_modules/glob": {
- "version": "10.3.10",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
- "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
+ "version": "10.5.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
+ "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"foreground-child": "^3.1.0",
- "jackspeak": "^2.3.5",
- "minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
- "path-scurry": "^1.10.1"
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
},
"bin": {
"glob": "dist/esm/bin.mjs"
},
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/unified-engine/node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
@@ -14942,6 +14944,7 @@
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^6.1.0",
"string-width": "^5.0.1",
@@ -14960,6 +14963,7 @@
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
@@ -14977,6 +14981,7 @@
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -14985,13 +14990,15 @@
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
},
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -15006,6 +15013,7 @@
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
@@ -15014,10 +15022,11 @@
}
},
"node_modules/wrap-ansi/node_modules/ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=12"
},
@@ -15030,6 +15039,7 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
@@ -15258,24 +15268,20 @@
}
},
"@babel/runtime": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz",
- "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
+ "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"dev": true,
- "peer": true,
- "requires": {
- "regenerator-runtime": "^0.13.4"
- }
+ "peer": true
},
"@babel/runtime-corejs3": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz",
- "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.4.tgz",
+ "integrity": "sha512-h7iEYiW4HebClDEhtvFObtPmIvrd1SSfpI9EhOeKk4CtIK/ngBWFpuhCzhdmRKtg71ylcue+9I6dv54XYO1epQ==",
"dev": true,
"peer": true,
"requires": {
- "core-js-pure": "^3.20.2",
- "regenerator-runtime": "^0.13.4"
+ "core-js-pure": "^3.43.0"
}
},
"@eslint/eslintrc": {
@@ -15386,9 +15392,9 @@
},
"dependencies": {
"brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
@@ -15784,9 +15790,9 @@
"dev": true
},
"brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"peer": true,
"requires": {
@@ -16020,16 +16026,16 @@
"dev": true
},
"core-js-pure": {
- "version": "3.20.2",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.2.tgz",
- "integrity": "sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg==",
+ "version": "3.47.0",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.47.0.tgz",
+ "integrity": "sha512-BcxeDbzUrRnXGYIVAGFtcGQVNpFcUhVjr6W7F8XktvQW2iJP9e66GP6xdKotCRFlrxBvNIBrhwKteRXqMV86Nw==",
"dev": true,
"peer": true
},
"cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
@@ -17216,14 +17222,6 @@
"dev": true,
"requires": {
"lru-cache": "^10.0.1"
- },
- "dependencies": {
- "lru-cache": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
- "dev": true
- }
}
},
"html-url-attributes": {
@@ -17563,9 +17561,9 @@
"dev": true
},
"jackspeak": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
- "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
"dev": true,
"requires": {
"@isaacs/cliui": "^8.0.2",
@@ -17579,9 +17577,9 @@
"dev": true
},
"js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true,
"peer": true,
"requires": {
@@ -17719,6 +17717,12 @@
"integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
"dev": true
},
+ "lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "dev": true
+ },
"markdown-extensions": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz",
@@ -18488,9 +18492,9 @@
"dev": true
},
"minipass": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
- "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
"dev": true
},
"mkdirp": {
@@ -18754,6 +18758,12 @@
"integrity": "sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==",
"dev": true
},
+ "package-json-from-dist": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
+ "dev": true
+ },
"parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -18911,21 +18921,13 @@
"peer": true
},
"path-scurry": {
- "version": "1.10.1",
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
"dev": true,
"requires": {
- "lru-cache": "^9.1.1 || ^10.0.0",
+ "lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
- },
- "dependencies": {
- "lru-cache": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
- "dev": true
- }
}
},
"picomatch": {
@@ -19064,13 +19066,6 @@
"picomatch": "^2.2.1"
}
},
- "regenerator-runtime": {
- "version": "0.13.9",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
- "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
- "dev": true,
- "peer": true
- },
"regexp.prototype.flags": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz",
@@ -26019,31 +26014,32 @@
"dev": true
},
"brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"glob": {
- "version": "10.3.10",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
- "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
+ "version": "10.5.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
+ "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"dev": true,
"requires": {
"foreground-child": "^3.1.0",
- "jackspeak": "^2.3.5",
- "minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
- "path-scurry": "^1.10.1"
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
}
},
"minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
@@ -26600,9 +26596,9 @@
},
"dependencies": {
"ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
"dev": true
},
"string-width": {
diff --git a/qodana.yaml b/qodana.yaml
index 2e670e81c8..0628d209ff 100644
--- a/qodana.yaml
+++ b/qodana.yaml
@@ -110,9 +110,9 @@ exclude:
- GitVersion.Core/VersionCalculation/VersionSearchStrategies/TrackReleaseBranchesVersionStrategy.cs
- GitVersion.Configuration/Builders/IgnoreConfigurationBuilder.cs
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
-bootstrap: dotnet build src/GitVersion.slnx
+bootstrap: curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --jsonfile /data/project/global.json -i /usr/share/dotnet && dotnet build src/GitVersion.slnx
dotnet:
- frameworks: net8.0;net9.0
+ frameworks: net8.0;net9.0;net10.0
solution: src/GitVersion.slnx
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
diff --git a/src/.run/cli (help).run.xml b/src/.run/cli (help).run.xml
index 38d1df084c..a8457356e3 100644
--- a/src/.run/cli (help).run.xml
+++ b/src/.run/cli (help).run.xml
@@ -1,18 +1,21 @@
-
+
-
+
-
+
+
+
+
-
+
-
+
diff --git a/src/.run/cli (showconfig).run.xml b/src/.run/cli (showconfig).run.xml
index ef335cde5a..3201347d14 100644
--- a/src/.run/cli (showconfig).run.xml
+++ b/src/.run/cli (showconfig).run.xml
@@ -1,18 +1,21 @@
-
+
-
+
-
+
+
+
+
-
+
-
+
diff --git a/src/.run/cli (version).run.xml b/src/.run/cli (version).run.xml
index 023092b8a6..9afb33fcc3 100644
--- a/src/.run/cli (version).run.xml
+++ b/src/.run/cli (version).run.xml
@@ -1,18 +1,21 @@
-
+
-
+
+
+
+
-
+
-
+
diff --git a/src/.run/cli.run.xml b/src/.run/cli.run.xml
index 5721110b54..150a725934 100644
--- a/src/.run/cli.run.xml
+++ b/src/.run/cli.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
-
+
+
+
+
-
+
diff --git a/src/.run/schema.run.xml b/src/.run/schema.run.xml
index 263e4061bb..ef06b18565 100644
--- a/src/.run/schema.run.xml
+++ b/src/.run/schema.run.xml
@@ -1,18 +1,21 @@
-
+
-
+
-
+
+
+
+
-
+
-
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 1249fad91a..504f1ea51b 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,6 +1,6 @@
- net8.0;net9.0
+ net8.0;net9.0;net10.0
$([System.DateTime]::Today.Year)
GitTools and Contributors
@@ -19,6 +19,7 @@
git
$(NoWarn);NU1701;1591,8618,SYSLIB10;EnableGenerateDocumentationFile
+ $(NoWarn);CS8604;CS8620
$(WarningsAsErrors);RS0016;RS0017;RS0022;RS0024;RS0025;RS0026;RS0027
embedded
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index bb15285006..d6d2af3c30 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -6,43 +6,45 @@
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/GitVersion.App.Tests/ArgumentParserTests.cs b/src/GitVersion.App.Tests/ArgumentParserTests.cs
index 42e7c36304..911c1f0812 100644
--- a/src/GitVersion.App.Tests/ArgumentParserTests.cs
+++ b/src/GitVersion.App.Tests/ArgumentParserTests.cs
@@ -636,6 +636,21 @@ public void AllowshallowTrueWhenDefined()
arguments.AllowShallow.ShouldBe(true);
}
+ [Test]
+ public void DiagTrueWhenDefined()
+ {
+ var arguments = this.argumentParser.ParseArguments("-diag");
+ arguments.Diag.ShouldBe(true);
+ }
+
+ [Test]
+ public void DiagAndLogToConsoleIsNotIgnored()
+ {
+ var arguments = this.argumentParser.ParseArguments("-diag -l console");
+ arguments.Diag.ShouldBe(true);
+ arguments.LogFilePath.ShouldBe("console");
+ }
+
[Test]
public void OtherArgumentsCanBeParsedBeforeNofetch()
{
diff --git a/src/GitVersion.App.Tests/HelpWriterTests.cs b/src/GitVersion.App.Tests/HelpWriterTests.cs
index 38ef352b1f..f9d5f61a78 100644
--- a/src/GitVersion.App.Tests/HelpWriterTests.cs
+++ b/src/GitVersion.App.Tests/HelpWriterTests.cs
@@ -27,6 +27,7 @@ public void AllArgsAreInHelp()
{ nameof(Arguments.ClonePath), "/dynamicRepoLocation" },
{ nameof(Arguments.CommitId), "/c" },
+ { nameof(Arguments.Diag) , "/diag" },
{ nameof(Arguments.LogFilePath) , "/l" },
{ nameof(Arguments.Verbosity), "/verbosity" },
{ nameof(Arguments.Output) , "/output" },
diff --git a/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs b/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs
index b1dcf431b3..a1ed7f10cb 100644
--- a/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs
+++ b/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs
@@ -55,14 +55,18 @@ public Task Run(string arg)
public async Task Run(params string[] args)
{
- // Create the application and override registrations.
- var program = new Program(builder => Overrides.ForEach(action => action(builder)));
-
if (!this.workingDirectory.IsNullOrWhiteSpace())
{
args = ["-targetpath", this.workingDirectory, .. args];
}
- await program.RunAsync(args);
+
+ var builder = CliHost.CreateCliHostBuilder(args);
+
+ Overrides.ForEach(action => action(builder.Services));
+
+ var host = builder.Build();
+ var app = host.Services.GetRequiredService();
+ await app.RunAsync(CancellationToken.None);
return new(SysEnv.ExitCode, this.output.Value, this.logger.Value);
}
diff --git a/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs b/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs
index 30d6d48108..d9f8f1a3ec 100644
--- a/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs
+++ b/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs
@@ -1,6 +1,7 @@
using GitVersion.Agents;
using GitVersion.Core.Tests;
using GitVersion.Helpers;
+using GitVersion.Testing.Extensions;
namespace GitVersion.App.Tests;
diff --git a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs
index 56d919756f..c0dbf74ee0 100644
--- a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs
+++ b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs
@@ -4,6 +4,7 @@
using GitVersion.Git;
using GitVersion.Helpers;
using GitVersion.Output;
+using GitVersion.Testing.Extensions;
using LibGit2Sharp;
namespace GitVersion.App.Tests;
@@ -146,27 +147,25 @@ private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pu
using var fixture = new EmptyRepositoryFixture();
var remoteRepositoryPath = FileSystemHelper.Path.GetRepositoryTempPath();
RepositoryFixtureBase.Init(remoteRepositoryPath);
- using (var remoteRepository = new Repository(remoteRepositoryPath))
- {
- remoteRepository.Config.Set("user.name", "Test");
- remoteRepository.Config.Set("user.email", "test@email.com");
- fixture.Repository.Network.Remotes.Add("origin", remoteRepositoryPath);
- Console.WriteLine("Created git repository at {0}", remoteRepositoryPath);
- remoteRepository.MakeATaggedCommit("1.0.3");
-
- var branch = remoteRepository.CreateBranch("FeatureBranch");
- Commands.Checkout(remoteRepository, branch);
- remoteRepository.MakeCommits(2);
- Commands.Checkout(remoteRepository, remoteRepository.Head.Tip.Sha);
- //Emulate merge commit
- var mergeCommitSha = remoteRepository.MakeACommit().Sha;
- Commands.Checkout(remoteRepository, TestBase.MainBranch); // HEAD cannot be pointing at the merge commit
- remoteRepository.Refs.Add(pullRequestRef, new ObjectId(mergeCommitSha));
-
- // Checkout PR commit
- Commands.Fetch(fixture.Repository, "origin", [], new FetchOptions(), null);
- Commands.Checkout(fixture.Repository, mergeCommitSha);
- }
+ using var remoteRepository = new Repository(remoteRepositoryPath);
+ remoteRepository.Config.Set("user.name", "Test");
+ remoteRepository.Config.Set("user.email", "test@email.com");
+ fixture.Repository.Network.Remotes.Add("origin", remoteRepositoryPath);
+ Console.WriteLine("Created git repository at {0}", remoteRepositoryPath);
+ remoteRepository.MakeATaggedCommit("1.0.3");
+
+ var branch = remoteRepository.CreateBranch("FeatureBranch");
+ Commands.Checkout(remoteRepository, branch);
+ remoteRepository.MakeCommits(2);
+ Commands.Checkout(remoteRepository, remoteRepository.Head.Tip.Sha);
+ //Emulate merge commit
+ var mergeCommitSha = remoteRepository.MakeACommit().Sha;
+ Commands.Checkout(remoteRepository, TestBase.MainBranch); // HEAD cannot be pointing at the merge commit
+ remoteRepository.Refs.Add(pullRequestRef, new ObjectId(mergeCommitSha));
+
+ // Checkout PR commit
+ Commands.Fetch(fixture.Repository, "origin", [], new FetchOptions(), null);
+ Commands.Checkout(fixture.Repository, mergeCommitSha);
var programFixture = new ProgramFixture(fixture.RepositoryPath);
programFixture.WithOverrides(services =>
@@ -199,12 +198,12 @@ private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pu
public void VerifyPullRequestInput(string pullRequestRef, string friendly, bool isBranch, bool isPullRequest, bool isRemote)
{
var refName = new ReferenceName(pullRequestRef);
- Assert.Multiple(() =>
+ using (Assert.EnterMultipleScope())
{
Assert.That(refName.Friendly, Is.EqualTo(friendly));
Assert.That(refName.IsLocalBranch, Is.EqualTo(isBranch));
Assert.That(refName.IsPullRequest, Is.EqualTo(isPullRequest));
Assert.That(refName.IsRemoteBranch, Is.EqualTo(isRemote));
- });
+ }
}
}
diff --git a/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs b/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs
index fc31fa4a7d..a62df0f342 100644
--- a/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs
+++ b/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs
@@ -1,6 +1,7 @@
using GitVersion.Agents;
using GitVersion.Core.Tests.Helpers;
using GitVersion.Helpers;
+using GitVersion.Testing.Extensions;
using LibGit2Sharp;
namespace GitVersion.App.Tests;
diff --git a/src/GitVersion.App/ArgumentParser.cs b/src/GitVersion.App/ArgumentParser.cs
index 1f85a1b3d2..d7b4df31bc 100644
--- a/src/GitVersion.App/ArgumentParser.cs
+++ b/src/GitVersion.App/ArgumentParser.cs
@@ -212,11 +212,7 @@ private static bool ParseSwitches(Arguments arguments, string? name, IReadOnlyLi
if (name.IsSwitch("diag"))
{
- if (value?.IsTrue() != false)
- {
- arguments.Diag = true;
- }
-
+ arguments.Diag = true;
return true;
}
diff --git a/src/GitVersion.App/ArgumentParserExtensions.cs b/src/GitVersion.App/ArgumentParserExtensions.cs
index 852773f941..286849c44b 100644
--- a/src/GitVersion.App/ArgumentParserExtensions.cs
+++ b/src/GitVersion.App/ArgumentParserExtensions.cs
@@ -8,75 +8,80 @@ internal static class ArgumentParserExtensions
private static readonly string[] TrueValues = ["1", "true"];
private static readonly string[] FalseValues = ["0", "false"];
- public static bool IsTrue(this string? value) => TrueValues.Contains(value, StringComparer.OrdinalIgnoreCase);
-
- public static bool IsFalse(this string? value) => FalseValues.Contains(value, StringComparer.OrdinalIgnoreCase);
-
- public static bool IsValidPath(this string? path)
+ extension(string? value)
{
- if (path == null)
- return false;
+ public bool IsTrue() => TrueValues.Contains(value, StringComparer.OrdinalIgnoreCase);
+ public bool IsFalse() => FalseValues.Contains(value, StringComparer.OrdinalIgnoreCase);
- try
- {
- _ = FileSystemHelper.Path.GetFullPath(path);
- }
- catch
+ public bool IsValidPath()
{
- path = FileSystemHelper.Path.Combine(SysEnv.CurrentDirectory, path);
+ if (value == null)
+ return false;
try
{
- _ = FileSystemHelper.Path.GetFullPath(path);
+ _ = FileSystemHelper.Path.GetFullPath(value);
}
catch
{
- return false;
+ value = FileSystemHelper.Path.Combine(SysEnv.CurrentDirectory, value);
+
+ try
+ {
+ _ = FileSystemHelper.Path.GetFullPath(value);
+ }
+ catch (Exception)
+ {
+ return false;
+ }
}
- }
- return FileSystemHelper.Directory.Exists(path);
- }
-
- public static bool IsSwitchArgument(this string? value)
- {
- var patternRegex = RegexPatterns.Common.SwitchArgumentRegex();
- return value != null
- && (value.StartsWith('-') || value.StartsWith('/'))
- && !patternRegex.Match(value).Success;
- //Exclude msbuild & project parameters in form /blah:, which should be parsed as values, not switch names.
- }
-
- public static bool IsSwitch(this string? value, string switchName)
- {
- if (value == null)
- return false;
+ return FileSystemHelper.Directory.Exists(value);
+ }
- if (value.StartsWith('-'))
+ public bool IsSwitchArgument()
{
- value = value[1..];
+ var patternRegex = RegexPatterns.SwitchArgumentRegex;
+ return value != null
+ && (value.StartsWith('-') || value.StartsWith('/'))
+ && !patternRegex.Match(value).Success;
+ //Exclude msbuild & project parameters in form /blah:, which should be parsed as values, not switch names.
}
- if (value.StartsWith('/'))
+ public bool IsSwitch(string switchName)
{
- value = value[1..];
- }
+ if (value == null)
+ return false;
- return string.Equals(switchName, value, StringComparison.OrdinalIgnoreCase);
- }
+ if (value.StartsWith('-'))
+ {
+ value = value[1..];
+ }
+
+ if (value.StartsWith('/'))
+ {
+ value = value[1..];
+ }
- public static bool IsHelp(this string singleArgument) => (singleArgument == "?") || singleArgument.IsSwitch("h") || singleArgument.IsSwitch("help") || singleArgument.IsSwitch("?");
+ return string.Equals(switchName, value, StringComparison.OrdinalIgnoreCase);
+ }
+ }
- public static bool ArgumentRequiresValue(this string argument, int argumentIndex)
+ extension(string singleArgument)
{
- var booleanArguments = new[] { "updateassemblyinfo", "ensureassemblyinfo", "nofetch", "nonormalize", "nocache", "allowshallow" };
+ public bool IsHelp() => (singleArgument == "?") || singleArgument.IsSwitch("h") || singleArgument.IsSwitch("help") || singleArgument.IsSwitch("?");
- var argumentMightRequireValue = !booleanArguments.Contains(argument[1..], StringComparer.OrdinalIgnoreCase);
+ public bool ArgumentRequiresValue(int argumentIndex)
+ {
+ var booleanArguments = new[] { "updateassemblyinfo", "ensureassemblyinfo", "nofetch", "nonormalize", "nocache", "allowshallow", "diag" };
- // If this is the first argument that might be a target path, the argument starts with slash, and we're on an OS that supports paths with slashes, the argument does not require a value.
- if (argumentMightRequireValue && argumentIndex == 0 && argument.StartsWith('/') && FileSystemHelper.Path.DirectorySeparatorChar == '/' && argument.IsValidPath())
- return false;
+ var argumentMightRequireValue = !booleanArguments.Contains(singleArgument[1..], StringComparer.OrdinalIgnoreCase);
- return argumentMightRequireValue;
+ // If this is the first argument that might be a target path, the argument starts with slash, and we're on an OS that supports paths with slashes, the argument does not require a value.
+ if (argumentMightRequireValue && argumentIndex == 0 && singleArgument.StartsWith('/') && FileSystemHelper.Path.DirectorySeparatorChar == '/' && singleArgument.IsValidPath())
+ return false;
+
+ return argumentMightRequireValue;
+ }
}
}
diff --git a/src/GitVersion.App/CliHost.cs b/src/GitVersion.App/CliHost.cs
new file mode 100644
index 0000000000..357e7df742
--- /dev/null
+++ b/src/GitVersion.App/CliHost.cs
@@ -0,0 +1,35 @@
+using GitVersion.Agents;
+using GitVersion.Configuration;
+using GitVersion.Extensions;
+using GitVersion.Output;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Options;
+
+namespace GitVersion;
+
+internal static class CliHost
+{
+ internal static HostApplicationBuilder CreateCliHostBuilder(string[] args)
+ {
+ var builder = Host.CreateApplicationBuilder(args);
+
+ builder.Services.AddModule(new GitVersionCoreModule());
+ builder.Services.AddModule(new GitVersionLibGit2SharpModule());
+ builder.Services.AddModule(new GitVersionBuildAgentsModule());
+ builder.Services.AddModule(new GitVersionConfigurationModule());
+ builder.Services.AddModule(new GitVersionOutputModule());
+ builder.Services.AddModule(new GitVersionAppModule());
+
+ builder.Services.AddSingleton(sp =>
+ {
+ var arguments = sp.GetRequiredService().ParseArguments(args);
+ var gitVersionOptions = arguments.ToOptions();
+ return Options.Create(gitVersionOptions);
+ });
+
+ builder.Services.AddSingleton();
+
+ return builder;
+ }
+}
diff --git a/src/GitVersion.App/FileSystemGlobbing/MatcherExtensions.cs b/src/GitVersion.App/FileSystemGlobbing/MatcherExtensions.cs
index fa568b712b..1d8db805f4 100644
--- a/src/GitVersion.App/FileSystemGlobbing/MatcherExtensions.cs
+++ b/src/GitVersion.App/FileSystemGlobbing/MatcherExtensions.cs
@@ -5,71 +5,66 @@ namespace GitVersion.FileSystemGlobbing;
internal static class MatcherExtensions
{
- public static PatternMatchingResult Execute(
- this Matcher matcher,
- IFileSystem fileSystem,
- string directoryPath
- )
+ extension(Matcher matcher)
{
- ArgumentNullException.ThrowIfNull(matcher);
- ArgumentNullException.ThrowIfNull(fileSystem);
+ public PatternMatchingResult Execute(IFileSystem fileSystem,
+ string directoryPath
+ )
+ {
+ ArgumentNullException.ThrowIfNull(matcher);
+ ArgumentNullException.ThrowIfNull(fileSystem);
- return Execute(matcher, fileSystem, fileSystem.DirectoryInfo.New(directoryPath));
- }
+ return Execute(matcher, fileSystem, fileSystem.DirectoryInfo.New(directoryPath));
+ }
- private static PatternMatchingResult Execute(
- this Matcher matcher,
- IFileSystem fileSystem,
- IDirectoryInfo directoryInfo
- )
- {
- ArgumentNullException.ThrowIfNull(matcher);
- ArgumentNullException.ThrowIfNull(fileSystem);
- ArgumentNullException.ThrowIfNull(directoryInfo);
+ private PatternMatchingResult Execute(IFileSystem fileSystem,
+ IDirectoryInfo directoryInfo
+ )
+ {
+ ArgumentNullException.ThrowIfNull(matcher);
+ ArgumentNullException.ThrowIfNull(fileSystem);
+ ArgumentNullException.ThrowIfNull(directoryInfo);
- return matcher.Execute(new DirectoryInfoGlobbingWrapper(fileSystem, directoryInfo));
- }
+ return matcher.Execute(new DirectoryInfoGlobbingWrapper(fileSystem, directoryInfo));
+ }
- public static IEnumerable GetResultsInFullPath(
- this Matcher matcher,
- IFileSystem fileSystem,
- string directoryPath
- )
- {
- ArgumentNullException.ThrowIfNull(matcher);
- ArgumentNullException.ThrowIfNull(fileSystem);
+ public IEnumerable GetResultsInFullPath(IFileSystem fileSystem,
+ string directoryPath
+ )
+ {
+ ArgumentNullException.ThrowIfNull(matcher);
+ ArgumentNullException.ThrowIfNull(fileSystem);
- return GetResultsInFullPath(
- matcher,
- fileSystem,
- fileSystem.DirectoryInfo.New(directoryPath)
- );
- }
+ return GetResultsInFullPath(
+ matcher,
+ fileSystem,
+ fileSystem.DirectoryInfo.New(directoryPath)
+ );
+ }
- private static IEnumerable GetResultsInFullPath(
- this Matcher matcher,
- IFileSystem fileSystem,
- IDirectoryInfo directoryInfo
- )
- {
- ArgumentNullException.ThrowIfNull(matcher);
- ArgumentNullException.ThrowIfNull(fileSystem);
- ArgumentNullException.ThrowIfNull(directoryInfo);
+ private IEnumerable GetResultsInFullPath(IFileSystem fileSystem,
+ IDirectoryInfo directoryInfo
+ )
+ {
+ ArgumentNullException.ThrowIfNull(matcher);
+ ArgumentNullException.ThrowIfNull(fileSystem);
+ ArgumentNullException.ThrowIfNull(directoryInfo);
- var matches = Execute(matcher, fileSystem, directoryInfo);
+ var matches = Execute(matcher, fileSystem, directoryInfo);
- if (!matches.HasMatches)
- {
- return EmptyStringsEnumerable;
- }
+ if (!matches.HasMatches)
+ {
+ return EmptyStringsEnumerable;
+ }
- var fsPath = fileSystem.Path;
- var directoryFullName = directoryInfo.FullName;
+ var fsPath = fileSystem.Path;
+ var directoryFullName = directoryInfo.FullName;
- return matches.Files.Select(GetFullPath);
+ return matches.Files.Select(GetFullPath);
- string GetFullPath(FilePatternMatch match) =>
- fsPath.GetFullPath(fsPath.Combine(directoryFullName, match.Path));
+ string GetFullPath(FilePatternMatch match) =>
+ fsPath.GetFullPath(fsPath.Combine(directoryFullName, match.Path));
+ }
}
private static readonly IEnumerable EmptyStringsEnumerable = [];
diff --git a/src/GitVersion.App/GitVersionApp.cs b/src/GitVersion.App/GitVersionApp.cs
index 596675bd0c..ae9bc0f9c4 100644
--- a/src/GitVersion.App/GitVersionApp.cs
+++ b/src/GitVersion.App/GitVersionApp.cs
@@ -5,15 +5,18 @@
namespace GitVersion;
-internal class GitVersionApp(ILog log, IHostApplicationLifetime applicationLifetime, IGitVersionExecutor gitVersionExecutor, IOptions options)
- : IHostedService
+internal class GitVersionApp(
+ ILog log,
+ IHostApplicationLifetime applicationLifetime,
+ IGitVersionExecutor gitVersionExecutor,
+ IOptions options)
{
private readonly ILog log = log.NotNull();
private readonly IHostApplicationLifetime applicationLifetime = applicationLifetime.NotNull();
private readonly IGitVersionExecutor gitVersionExecutor = gitVersionExecutor.NotNull();
private readonly IOptions options = options.NotNull();
- public Task StartAsync(CancellationToken cancellationToken)
+ public Task RunAsync(CancellationToken _)
{
try
{
@@ -30,6 +33,4 @@ public Task StartAsync(CancellationToken cancellationToken)
this.applicationLifetime.StopApplication();
return Task.CompletedTask;
}
-
- public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
diff --git a/src/GitVersion.App/Program.cs b/src/GitVersion.App/Program.cs
index 9984539bc6..f82d650445 100644
--- a/src/GitVersion.App/Program.cs
+++ b/src/GitVersion.App/Program.cs
@@ -1,45 +1,16 @@
-using GitVersion.Agents;
-using GitVersion.Configuration;
-using GitVersion.Extensions;
-using GitVersion.Output;
-using Microsoft.Extensions.Configuration;
+using GitVersion;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Options;
-namespace GitVersion;
+var builder = CliHost.CreateCliHostBuilder(args);
-internal class Program
-{
- private readonly Action? overrides;
-
- internal Program(Action? overrides = null) => this.overrides = overrides;
-
- private static async Task Main(string[] args) => await new Program().RunAsync(args);
+var host = builder.Build();
+var app = host.Services.GetRequiredService();
- internal Task RunAsync(string[] args) => CreateHostBuilder(args).Build().RunAsync();
-
- private IHostBuilder CreateHostBuilder(string[] args) =>
- new HostBuilder()
- .ConfigureAppConfiguration((_, configApp) => configApp.AddCommandLine(args))
- .ConfigureServices((_, services) =>
- {
- services.AddModule(new GitVersionCoreModule());
- services.AddModule(new GitVersionLibGit2SharpModule());
- services.AddModule(new GitVersionBuildAgentsModule());
- services.AddModule(new GitVersionConfigurationModule());
- services.AddModule(new GitVersionOutputModule());
- services.AddModule(new GitVersionAppModule());
-
- services.AddSingleton(sp =>
- {
- var arguments = sp.GetRequiredService().ParseArguments(args);
- var gitVersionOptions = arguments.ToOptions();
- return Options.Create(gitVersionOptions);
- });
+var cts = new CancellationTokenSource();
+Console.CancelKeyPress += (_, _) =>
+{
+ cts.Cancel();
+ cts.Dispose();
+};
- this.overrides?.Invoke(services);
- services.AddHostedService();
- })
- .UseConsoleLifetime();
-}
+await app.RunAsync(cts.Token).ConfigureAwait(false);
diff --git a/src/GitVersion.Configuration.Tests/Configuration/Extensions.cs b/src/GitVersion.Configuration.Tests/Configuration/Extensions.cs
index dafc7c5ce0..e8c971a253 100644
--- a/src/GitVersion.Configuration.Tests/Configuration/Extensions.cs
+++ b/src/GitVersion.Configuration.Tests/Configuration/Extensions.cs
@@ -6,22 +6,25 @@ namespace GitVersion.Configuration.Tests.Configuration;
public static class Extensions
{
- public static IDisposable SetupConfigFile(this IFileSystem fileSystem, string? path = null, string fileName = ConfigurationFileLocator.DefaultFileName, string text = "")
+ extension(IFileSystem fileSystem)
{
- if (path.IsNullOrEmpty())
+ public IDisposable SetupConfigFile(string? path = null, string fileName = ConfigurationFileLocator.DefaultFileName, string text = "")
{
- path = FileSystemHelper.Path.GetRepositoryTempPath();
- }
+ if (path.IsNullOrEmpty())
+ {
+ path = FileSystemHelper.Path.GetRepositoryTempPath();
+ }
- var fullPath = FileSystemHelper.Path.Combine(path, fileName);
- var directory = FileSystemHelper.Path.GetDirectoryName(fullPath);
- if (!fileSystem.Directory.Exists(directory))
- {
- fileSystem.Directory.CreateDirectory(directory);
- }
+ var fullPath = FileSystemHelper.Path.Combine(path, fileName);
+ var directory = FileSystemHelper.Path.GetDirectoryName(fullPath);
+ if (!fileSystem.Directory.Exists(directory))
+ {
+ fileSystem.Directory.CreateDirectory(directory);
+ }
- fileSystem.File.WriteAllText(fullPath, text);
+ fileSystem.File.WriteAllText(fullPath, text);
- return Disposable.Create(fullPath, () => fileSystem.File.Delete(fullPath));
+ return Disposable.Create(fullPath, () => fileSystem.File.Delete(fullPath));
+ }
}
}
diff --git a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs
index 0852be5681..e67f847b45 100644
--- a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs
+++ b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs
@@ -6,6 +6,7 @@
using GitVersion.Git;
using GitVersion.Helpers;
using GitVersion.Logging;
+using GitVersion.Testing.Extensions;
using GitVersion.VersionCalculation.Caching;
using LibGit2Sharp;
using Microsoft.Extensions.DependencyInjection;
@@ -695,9 +696,8 @@ private static IServiceProvider GetServiceProvider(GitVersionOptions gitVersionO
services.AddSingleton();
services.AddSingleton(sp =>
{
- var options = sp.GetRequiredService>();
var contextFactory = sp.GetRequiredService();
- return new Lazy(() => contextFactory.Create(options.Value));
+ return new Lazy(() => contextFactory.Create());
});
if (log != null) services.AddSingleton(log);
if (fileSystem != null) services.AddSingleton(fileSystem);
diff --git a/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs b/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs
index d56739de7f..9ab32dd3a3 100644
--- a/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs
+++ b/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs
@@ -10,7 +10,7 @@ public class RegexPatternsTests
[TestCase("foo:", false, null)]
public void SwitchArgumentRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Common.SwitchArgumentRegex().Match(input);
+ var match = RegexPatterns.SwitchArgumentRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -21,7 +21,7 @@ public void SwitchArgumentRegex_MatchesExpected(string input, bool expected, str
[TestCase("ftp://user:pass@host", false, null)]
public void ObscurePasswordRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Common.ObscurePasswordRegex().Match(input);
+ var match = RegexPatterns.ObscurePasswordRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -34,7 +34,7 @@ public void ObscurePasswordRegex_MatchesExpected(string input, bool expected, st
[TestCase("env:FOO", false, null)]
public void ExpandTokensRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Common.ExpandTokensRegex().Match(input);
+ var match = RegexPatterns.ExpandTokensRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -49,7 +49,7 @@ public void ExpandTokensRegex_MatchesExpected(string input, bool expected, strin
[TestCase("", true, "")]
public void DefaultTagPrefixRegex_MatchesExpected(string input, bool expected, string expectedCapture)
{
- var match = RegexPatterns.Configuration.DefaultTagPrefixRegex().Match(input);
+ var match = RegexPatterns.Configuration.DefaultTagPrefixRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -60,7 +60,7 @@ public void DefaultTagPrefixRegex_MatchesExpected(string input, bool expected, s
[TestCase("main", false, null)]
public void DefaultVersionInBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.DefaultVersionInBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.DefaultVersionInBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -71,7 +71,7 @@ public void DefaultVersionInBranchRegex_MatchesExpected(string input, bool expec
[TestCase("develop", false, null)]
public void MainBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.MainBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.MainBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -83,7 +83,7 @@ public void MainBranchRegex_MatchesExpected(string input, bool expected, string?
[TestCase("main", false, null)]
public void DevelopBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.DevelopBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.DevelopBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -94,7 +94,7 @@ public void DevelopBranchRegex_MatchesExpected(string input, bool expected, stri
[TestCase("feature/foo", false, null)]
public void ReleaseBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.ReleaseBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.ReleaseBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -105,7 +105,7 @@ public void ReleaseBranchRegex_MatchesExpected(string input, bool expected, stri
[TestCase("hotfix/1.0", false, null)]
public void FeatureBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.FeatureBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.FeatureBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -117,7 +117,7 @@ public void FeatureBranchRegex_MatchesExpected(string input, bool expected, stri
[TestCase("main", false, null)]
public void PullRequestBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.PullRequestBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.PullRequestBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -128,7 +128,7 @@ public void PullRequestBranchRegex_MatchesExpected(string input, bool expected,
[TestCase("support/1.0", false, null)]
public void HotfixBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.HotfixBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.HotfixBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -139,7 +139,7 @@ public void HotfixBranchRegex_MatchesExpected(string input, bool expected, strin
[TestCase("main", false, null)]
public void SupportBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.SupportBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.SupportBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -149,7 +149,7 @@ public void SupportBranchRegex_MatchesExpected(string input, bool expected, stri
[TestCase("main", true, "main")]
public void UnknownBranchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Configuration.UnknownBranchRegex().Match(input);
+ var match = RegexPatterns.Configuration.UnknownBranchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -160,7 +160,7 @@ public void UnknownBranchRegex_MatchesExpected(string input, bool expected, stri
[TestCase("Finish feature/foo", false, null)]
public void DefaultMergeMessageRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.MergeMessage.DefaultMergeMessageRegex().Match(input);
+ var match = RegexPatterns.MergeMessage.DefaultMergeMessageRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -171,7 +171,7 @@ public void DefaultMergeMessageRegex_MatchesExpected(string input, bool expected
[TestCase("Merge branch 'feature/foo'", false, null)]
public void SmartGitMergeMessageRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.MergeMessage.SmartGitMergeMessageRegex().Match(input);
+ var match = RegexPatterns.MergeMessage.SmartGitMergeMessageRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -182,7 +182,7 @@ public void SmartGitMergeMessageRegex_MatchesExpected(string input, bool expecte
[TestCase("Finish feature/foo", false, null)]
public void BitBucketPullMergeMessageRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.MergeMessage.BitBucketPullMergeMessageRegex().Match(input);
+ var match = RegexPatterns.MergeMessage.BitBucketPullMergeMessageRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -193,7 +193,7 @@ public void BitBucketPullMergeMessageRegex_MatchesExpected(string input, bool ex
[TestCase("Merge pull request #123 from repo from feature/foo to develop", false, null)]
public void BitBucketPullv7MergeMessageRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.MergeMessage.BitBucketPullv7MergeMessageRegex().Match(input);
+ var match = RegexPatterns.MergeMessage.BitBucketPullv7MergeMessageRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -204,7 +204,7 @@ public void BitBucketPullv7MergeMessageRegex_MatchesExpected(string input, bool
[TestCase("Merge pull request #123 from repo from feature/foo to develop", false, null)]
public void BitBucketCloudPullMergeMessageRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.MergeMessage.BitBucketCloudPullMergeMessageRegex().Match(input);
+ var match = RegexPatterns.MergeMessage.BitBucketCloudPullMergeMessageRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -214,7 +214,7 @@ public void BitBucketCloudPullMergeMessageRegex_MatchesExpected(string input, bo
[TestCase("Merge pull request #123 from feature/foo into develop", false, null)]
public void AzureDevOpsPullMergeMessageRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.MergeMessage.AzureDevOpsPullMergeMessageRegex().Match(input);
+ var match = RegexPatterns.MergeMessage.AzureDevOpsPullMergeMessageRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -226,7 +226,7 @@ public void AzureDevOpsPullMergeMessageRegex_MatchesExpected(string input, bool
[TestCase("random text", false, null)]
public void CsharpAssemblyAttributeRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Output.CsharpAssemblyAttributeRegex().Match(input);
+ var match = RegexPatterns.Output.CsharpAssemblyAttributeRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -238,7 +238,7 @@ public void CsharpAssemblyAttributeRegex_MatchesExpected(string input, bool expe
[TestCase("random text", false, null)]
public void FsharpAssemblyAttributeRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Output.FsharpAssemblyAttributeRegex().Match(input);
+ var match = RegexPatterns.Output.FsharpAssemblyAttributeRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -250,7 +250,7 @@ public void FsharpAssemblyAttributeRegex_MatchesExpected(string input, bool expe
[TestCase("random text", false, null)]
public void VisualBasicAssemblyAttributeRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.Output.VisualBasicAssemblyAttributeRegex().Match(input);
+ var match = RegexPatterns.Output.VisualBasicAssemblyAttributeRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -261,7 +261,7 @@ public void VisualBasicAssemblyAttributeRegex_MatchesExpected(string input, bool
[TestCase("+semver: minor", false, null)]
public void DefaultMajorRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.VersionCalculation.DefaultMajorRegex().Match(input);
+ var match = RegexPatterns.VersionCalculation.DefaultMajorRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -272,7 +272,7 @@ public void DefaultMajorRegex_MatchesExpected(string input, bool expected, strin
[TestCase("+semver: patch", false, null)]
public void DefaultMinorRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.VersionCalculation.DefaultMinorRegex().Match(input);
+ var match = RegexPatterns.VersionCalculation.DefaultMinorRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -283,7 +283,7 @@ public void DefaultMinorRegex_MatchesExpected(string input, bool expected, strin
[TestCase("+semver: none", false, null)]
public void DefaultPatchRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.VersionCalculation.DefaultPatchRegex().Match(input);
+ var match = RegexPatterns.VersionCalculation.DefaultPatchRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -294,7 +294,7 @@ public void DefaultPatchRegex_MatchesExpected(string input, bool expected, strin
[TestCase("+semver: patch", false, null)]
public void DefaultNoBumpRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.VersionCalculation.DefaultNoBumpRegex().Match(input);
+ var match = RegexPatterns.VersionCalculation.DefaultNoBumpRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -305,7 +305,7 @@ public void DefaultNoBumpRegex_MatchesExpected(string input, bool expected, stri
[TestCase("1.2", false, null)]
public void ParseStrictRegex_MatchesExpected(string input, bool expected, string? expectedCapture)
{
- var match = RegexPatterns.SemanticVersion.ParseStrictRegex().Match(input);
+ var match = RegexPatterns.SemanticVersion.ParseStrictRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -317,7 +317,7 @@ public void ParseStrictRegex_MatchesExpected(string input, bool expected, string
[TestCase("1.2.3.4", true, "1.2.3.4")]
public void ParseLooseRegex_MatchesExpected(string input, bool expected, string expectedCapture)
{
- var match = RegexPatterns.SemanticVersion.ParseLooseRegex().Match(input);
+ var match = RegexPatterns.SemanticVersion.ParseLooseRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -328,7 +328,7 @@ public void ParseLooseRegex_MatchesExpected(string input, bool expected, string
[TestCase("random", true, "random")]
public void ParseBuildMetaDataRegex_MatchesExpected(string input, bool expected, string expectedCapture)
{
- var match = RegexPatterns.SemanticVersion.ParseBuildMetaDataRegex().Match(input);
+ var match = RegexPatterns.SemanticVersion.ParseBuildMetaDataRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -341,7 +341,7 @@ public void ParseBuildMetaDataRegex_MatchesExpected(string input, bool expected,
[TestCase("m@e#t!a", true, new[] { "@", "#", "!" })]
public void FormatBuildMetaDataRegex_CapturesInvalidCharacters(string input, bool shouldMatch, string[] expectedCaptures)
{
- var matches = RegexPatterns.SemanticVersion.FormatBuildMetaDataRegex().Matches(input);
+ var matches = RegexPatterns.SemanticVersion.FormatBuildMetaDataRegex.Matches(input);
var matched = matches.Count > 0;
matched.ShouldBe(shouldMatch, $"Expected match: {shouldMatch}, but found {matches.Count} matches.");
@@ -358,7 +358,7 @@ public void FormatBuildMetaDataRegex_CapturesInvalidCharacters(string input, boo
[TestCase("rc.2", true, "rc.2")]
public void ParsePreReleaseTagRegex_MatchesExpected(string input, bool expected, string expectedCapture)
{
- var match = RegexPatterns.SemanticVersion.ParsePreReleaseTagRegex().Match(input);
+ var match = RegexPatterns.SemanticVersion.ParsePreReleaseTagRegex.Match(input);
match.Success.ShouldBe(expected);
if (expected)
match.Value.ShouldBe(expectedCapture);
@@ -370,7 +370,7 @@ public void ParsePreReleaseTagRegex_MatchesExpected(string input, bool expected,
[TestCase("int x = 5;", false, "", "")]
public void CSharpTriviaRegex_CapturesExpected(string input, bool expectedMatch, string expectedGroup, string expectedGroupValue)
{
- var regex = CSharp.TriviaRegex();
+ var regex = CSharp.TriviaRegex;
var match = regex.Match(input);
match.Success.ShouldBe(expectedMatch);
@@ -395,7 +395,7 @@ public void CSharpTriviaRegex_CapturesExpected(string input, bool expectedMatch,
[TestCase("[assembly: AssemblyTitle(\"App\")]", false)]
public void CSharpAttributeRegex_MatchesExpected(string input, bool expectedMatch)
{
- var regex = CSharp.AttributeRegex();
+ var regex = CSharp.AttributeRegex;
var match = regex.Match(input);
match.Success.ShouldBe(expectedMatch);
}
@@ -406,7 +406,7 @@ public void CSharpAttributeRegex_MatchesExpected(string input, bool expectedMatc
[TestCase("let x = 1", false, "", "")]
public void FSharpTriviaRegex_CapturesExpected(string input, bool expectedMatch, string expectedGroup, string expectedGroupValue)
{
- var regex = FSharp.TriviaRegex();
+ var regex = FSharp.TriviaRegex;
var match = regex.Match(input);
match.Success.ShouldBe(expectedMatch);
@@ -431,7 +431,7 @@ public void FSharpTriviaRegex_CapturesExpected(string input, bool expectedMatch,
[TestCase("[assembly: AssemblyVersion()]", false)]
public void FSharpAttributeRegex_MatchesExpected(string input, bool expectedMatch)
{
- var regex = FSharp.AttributeRegex();
+ var regex = FSharp.AttributeRegex;
var match = regex.Match(input);
match.Success.ShouldBe(expectedMatch);
}
diff --git a/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs b/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs
index 47258223f8..5e9addaab6 100644
--- a/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs
+++ b/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs
@@ -43,7 +43,7 @@ private static IRemote MockRemote(IGitRepository repository)
references["develop"].Returns(reference);
references.MockCollectionReturn(reference);
- repository.Refs.Returns(references);
+ repository.References.Returns(references);
repository.Head.Returns(branch);
repository.Branches.Returns(branches);
return remote;
diff --git a/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs b/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs
index 9e58ad8bcb..ddb91145e3 100644
--- a/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs
+++ b/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs
@@ -1,6 +1,5 @@
using GitVersion.Configuration;
using GitVersion.Core.Tests.Helpers;
-using GitVersion.Core.Tests.IntegrationTests;
using GitVersion.Git;
using GitVersion.Logging;
using Microsoft.Extensions.DependencyInjection;
diff --git a/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs b/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs
index 1dd6e242c8..dff0409f9c 100644
--- a/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs
+++ b/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs
@@ -4,8 +4,8 @@
using GitVersion.Extensions;
using GitVersion.Git;
using GitVersion.Helpers;
-using GitVersion.Logging;
using GitVersion.OutputVariables;
+using GitVersion.Testing.Extensions;
using GitVersion.VersionCalculation;
using LibGit2Sharp;
using Microsoft.Extensions.DependencyInjection;
@@ -55,136 +55,147 @@ public static IBranch CreateMockBranch(string name, params ICommit[] commits)
return branch;
}
- public static void DiscoverRepository(this IServiceProvider sp)
+ extension(IServiceProvider sp)
{
- var gitRepository = sp.GetRequiredService();
- var gitRepositoryInfo = sp.GetRequiredService();
- gitRepository.DiscoverRepository(gitRepositoryInfo.GitRootPath);
+ public void DiscoverRepository()
+ {
+ var gitRepository = sp.GetRequiredService();
+ var gitRepositoryInfo = sp.GetRequiredService();
+ gitRepository.DiscoverRepository(gitRepositoryInfo.GitRootPath);
+ }
}
- public static IBranch FindBranch(this IGitRepository repository, string branchName)
- => repository.Branches.FirstOrDefault(branch => branch.Name.WithoutOrigin == branchName)
- ?? throw new GitVersionException($"Branch {branchName} not found");
+ extension(IGitRepository repository)
+ {
+ public IBranch FindBranch(string branchName)
+ => repository.Branches.FirstOrDefault(branch => branch.Name.WithoutOrigin == branchName)
+ ?? throw new GitVersionException($"Branch {branchName} not found");
- public static void DumpGraph(this IGitRepository repository, Action? writer = null, int? maxCommits = null)
- => DumpGraph(repository.Path, writer, maxCommits);
+ public void DumpGraph(Action? writer = null, int? maxCommits = null)
+ => DumpGraph(repository.Path, writer, maxCommits);
+ }
- public static void DumpGraph(this IRepository repository, Action? writer = null, int? maxCommits = null)
- => DumpGraph(repository.ToGitRepository().Path, writer, maxCommits);
+ extension(IRepository repository)
+ {
+ public void DumpGraph(Action? writer = null, int? maxCommits = null)
+ => DumpGraph(repository.ToGitRepository().Path, writer, maxCommits);
+ }
- public static void RenameRemote(this LibGit2Sharp.RemoteCollection remotes, string oldName, string newName)
+ extension(RemoteCollection remotes)
{
- if (oldName.IsEquivalentTo(newName)) return;
- if (remotes.Any(remote => remote.Name == newName))
- {
- throw new InvalidOperationException($"A remote with the name '{newName}' already exists.");
- }
- if (!remotes.Any(remote => remote.Name == oldName))
+ public void RenameRemote(string oldName, string newName)
{
- throw new InvalidOperationException($"A remote with the name '{oldName}' does not exist.");
+ if (oldName.IsEquivalentTo(newName)) return;
+ if (remotes.Any(remote => remote.Name == newName))
+ {
+ throw new InvalidOperationException($"A remote with the name '{newName}' already exists.");
+ }
+ if (remotes.All(remote => remote.Name != oldName))
+ {
+ throw new InvalidOperationException($"A remote with the name '{oldName}' does not exist.");
+ }
+ remotes.Add(newName, remotes[oldName].Url);
+ remotes.Remove(oldName);
}
- remotes.Add(newName, remotes[oldName].Url);
- remotes.Remove(oldName);
}
- public static GitVersionVariables GetVersion(this RepositoryFixtureBase fixture, IGitVersionConfiguration? configuration = null,
- IRepository? repository = null, string? commitId = null, bool onlyTrackedBranches = true, string? targetBranch = null)
+ extension(RepositoryFixtureBase fixture)
{
- repository ??= fixture.Repository;
- configuration ??= GitFlowConfigurationBuilder.New.Build();
-
- var overrideConfiguration = new Dictionary