From fd3e6ead25c0e2653f14dc279b42357f5f2bd000 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 23:32:08 +0000 Subject: [PATCH] feat: use released VersionMark from NuGet in CI release process and lint scripts Agent-Logs-Url: https://github.com/demaconsulting/VersionMark/sessions/d93969e4-ec6b-44b2-a1fe-3a717b31fdcf Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .config/dotnet-tools.json | 6 ++++++ .github/workflows/build.yaml | 27 +++------------------------ lint.bat | 4 ++++ lint.sh | 5 +++++ 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index db339c5..87d4a6d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -44,6 +44,12 @@ "buildmark" ] }, + "demaconsulting.versionmark": { + "version": "1.2.0", + "commands": [ + "versionmark" + ] + }, "demaconsulting.reviewmark": { "version": "1.0.0", "commands": [ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7a7b65f..3ef98ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,9 +21,6 @@ jobs: # === INSTALL DEPENDENCIES === # This section installs all required dependencies for quality checks. # Downstream projects: Add any additional dependency installations here. - # Note: VersionMark version capture is not available here because this job - # builds VersionMark itself - capture is performed in integration-test and - # build-docs jobs after the tool is built and installed. - name: Checkout uses: actions/checkout@v6 @@ -87,9 +84,6 @@ jobs: # === BUILD AND TEST === # This section builds and tests the project. - # Note: VersionMark version capture is not available here because this job - # builds VersionMark itself - capture is performed in integration-test and - # build-docs jobs after the tool is built and installed. # Downstream projects: Add any additional build and test steps here. - name: Restore Dependencies @@ -364,12 +358,6 @@ jobs: merge-multiple: true continue-on-error: true - - name: Download packages artifact - uses: actions/download-artifact@v8 - with: - name: packages-ubuntu-latest - path: packages - # === INSTALL DEPENDENCIES === # This section installs all required dependencies and tools for document generation. # Downstream projects: Add any additional dependency installations here. @@ -387,15 +375,6 @@ jobs: - name: Install npm dependencies run: npm install - - name: Install VersionMark from package - shell: bash - run: | - echo "Installing VersionMark version ${{ inputs.version }}" - dotnet tool install --global \ - --add-source packages \ - --version ${{ inputs.version }} \ - DemaConsulting.VersionMark - - name: Restore Tools run: dotnet tool restore @@ -408,7 +387,7 @@ jobs: run: | mkdir -p artifacts echo "Capturing tool versions..." - versionmark --capture --job-id "build-docs" \ + dotnet versionmark --capture --job-id "build-docs" \ --output "artifacts/versionmark-build-docs.json" -- \ dotnet git node npm pandoc weasyprint sarifmark sonarmark reqstream buildmark reviewmark echo "✓ Tool versions captured" @@ -424,7 +403,7 @@ jobs: run: dotnet buildmark --validate --results artifacts/buildmark-self-validation.trx - name: Run VersionMark self-validation - run: versionmark --validate --results artifacts/versionmark-self-validation.trx + run: dotnet versionmark --validate --results artifacts/versionmark-self-validation.trx - name: Run SarifMark self-validation run: dotnet sarifmark --validate --results artifacts/sarifmark-self-validation.trx @@ -523,7 +502,7 @@ jobs: shell: bash run: | echo "Publishing tool versions..." - versionmark --publish --report docs/build_notes/versions.md --report-depth 1 \ + dotnet versionmark --publish --report docs/build_notes/versions.md --report-depth 1 \ -- "artifacts/**/versionmark-*.json" echo "✓ Tool versions published" diff --git a/lint.bat b/lint.bat index 36cfcf7..f373b99 100644 --- a/lint.bat +++ b/lint.bat @@ -66,6 +66,10 @@ REM Run reqstream lint dotnet reqstream --lint --requirements requirements.yaml if errorlevel 1 set "LINT_ERROR=1" +REM Run versionmark lint +dotnet versionmark --lint +if errorlevel 1 set "LINT_ERROR=1" + REM Run reviewmark lint dotnet reviewmark --lint if errorlevel 1 set "LINT_ERROR=1" diff --git a/lint.sh b/lint.sh index 5fd8ddd..4588497 100755 --- a/lint.sh +++ b/lint.sh @@ -58,6 +58,11 @@ if [ "$skip_dotnet_tools" != "1" ]; then dotnet reqstream --lint --requirements requirements.yaml || lint_error=1 fi +# Run versionmark lint +if [ "$skip_dotnet_tools" != "1" ]; then + dotnet versionmark --lint || lint_error=1 +fi + # Run reviewmark lint if [ "$skip_dotnet_tools" != "1" ]; then dotnet reviewmark --lint || lint_error=1