Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
"commands": [
"sarifmark"
]
},
"demaconsulting.versionmark": {
"version": "0.1.0",
"commands": [
"versionmark"
]
}
}
}
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"snupkg",
"tracematrix",
"trx",
"versionmark",
"Weasyprint",
"yamllint"
],
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x

- name: Restore Tools
run: dotnet tool restore

- name: Capture tool versions
shell: bash
run: |
echo "Capturing tool versions..."
# Capture versionmark itself for complete tool transparency
dotnet versionmark --capture --job-id "quality" -- dotnet git versionmark
echo "✓ Tool versions captured"

- name: Upload version capture
uses: actions/upload-artifact@v6
with:
name: version-capture-quality
path: versionmark-quality.json

- name: Run markdown linter
uses: DavidAnson/markdownlint-cli2-action@v22
with:
Expand Down Expand Up @@ -116,6 +138,22 @@ jobs:
--no-restore
--property:PackageVersion=${{ inputs.version }}

- name: Capture tool versions
shell: bash
run: |
echo "Capturing tool versions..."
# Create short job ID: build-win, build-ubuntu
OS_SHORT=$(echo "${{ matrix.os }}" | sed 's/windows-latest/win/;s/ubuntu-latest/ubuntu/')
JOB_ID="build-${OS_SHORT}"
dotnet versionmark --capture --job-id "${JOB_ID}" -- dotnet git dotnet-sonarscanner versionmark
echo "✓ Tool versions captured"

- name: Upload version capture
uses: actions/upload-artifact@v6
with:
name: version-capture-${{ matrix.os }}
path: versionmark-build-*.json

- name: Upload Test Results
uses: actions/upload-artifact@v6
with:
Expand Down Expand Up @@ -201,6 +239,13 @@ jobs:
dotnet-version: ['8.x', '9.x', '10.x']

steps:
- name: Checkout
uses: actions/checkout@v6
with:
sparse-checkout: |
.versionmark.yaml
.config/dotnet-tools.json

- name: Download package
uses: actions/download-artifact@v7
with:
Expand All @@ -212,6 +257,9 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Restore Tools
run: dotnet tool restore

- name: Install tool from package
shell: bash
run: |
Expand Down Expand Up @@ -243,6 +291,23 @@ jobs:
|| { echo "✗ Self-validation failed"; exit 1; }
echo "✓ Self-validation succeeded"

- name: Capture tool versions
shell: bash
run: |
echo "Capturing tool versions..."
# Create short job ID: int-win-8, int-win-9, int-ubuntu-8, etc.
OS_SHORT=$(echo "${{ matrix.os }}" | sed 's/windows-latest/win/;s/ubuntu-latest/ubuntu/')
DOTNET_SHORT=$(echo "${{ matrix.dotnet-version }}" | sed 's/\.x$//')
JOB_ID="int-${OS_SHORT}-${DOTNET_SHORT}"
dotnet versionmark --capture --job-id "${JOB_ID}" -- dotnet git versionmark
echo "✓ Tool versions captured"

- name: Upload version capture
uses: actions/upload-artifact@v6
with:
name: version-capture-${{ matrix.os }}-dotnet${{ matrix.dotnet-version }}
path: versionmark-int-*.json

- name: Upload validation test results
if: always()
uses: actions/upload-artifact@v6
Expand Down Expand Up @@ -307,6 +372,13 @@ jobs:
name: codeql-sarif
path: codeql-results

- name: Download all version captures
uses: actions/download-artifact@v7
with:
path: version-captures
pattern: 'version-capture-*'
continue-on-error: true

- name: Generate Requirements Report and Trace Matrix
run: >
dotnet reqstream
Expand Down Expand Up @@ -359,6 +431,31 @@ jobs:
--report docs/buildnotes.md
--report-depth 1

- name: Capture tool versions for build-docs
shell: bash
run: |
echo "Capturing tool versions..."
dotnet versionmark --capture --job-id "build-docs" -- \
dotnet git node npm pandoc weasyprint \
sarifmark sonarmark reqstream buildmark versionmark
echo "✓ Tool versions captured"

- name: Publish Tool Versions
shell: bash
run: |
echo "Publishing tool versions..."
dotnet versionmark --publish \
--report docs/buildnotes/versions.md \
--report-depth 1 \
-- "versionmark-*.json" "version-captures/**/versionmark-*.json"
echo "✓ Tool versions published"

- name: Display Tool Versions Report
shell: bash
run: |
echo "=== Tool Versions Report ==="
cat docs/buildnotes/versions.md

- name: Display Build Notes Report
shell: bash
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ docs/quality/sonar-quality.md
docs/quality/codeql-quality.md
docs/quality/*.html
docs/buildnotes.md
docs/buildnotes/versions.md
docs/buildnotes/*.html

# VersionMark captures (generated during CI/CD)
versionmark-*.json

# Agent report files
AGENT_REPORT_*.md
65 changes: 65 additions & 0 deletions .versionmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
# VersionMark Configuration File
# This file defines which tools to capture and how to extract their version information.

tools:
# .NET SDK
# Note: .NET SDK versions include up to 4 components (e.g., 10.0.102, 8.0.404)
dotnet:
command: dotnet --version
regex: '(?<version>\d+\.\d+\.\d+(?:\.\d+)?)'

# Git
git:
command: git --version
regex: '(?i)git version (?<version>\d+\.\d+\.\d+)'

# Node.js
node:
command: node --version
regex: '(?i)v(?<version>\d+\.\d+\.\d+)'

# npm
npm:
command: npm --version
regex: '(?<version>\d+\.\d+\.\d+)'

# SonarScanner for .NET (from dotnet tool list)
dotnet-sonarscanner:
command: dotnet tool list
regex: '(?i)dotnet-sonarscanner\s+(?<version>\d+\.\d+\.\d+)'

# Pandoc (DemaConsulting.PandocTool from dotnet tool list)
pandoc:
command: dotnet tool list
regex: '(?i)demaconsulting\.pandoctool\s+(?<version>\d+\.\d+\.\d+)'

# WeasyPrint (DemaConsulting.WeasyPrintTool from dotnet tool list)
weasyprint:
command: dotnet tool list
regex: '(?i)demaconsulting\.weasyprinttool\s+(?<version>\d+\.\d+\.\d+)'

# SarifMark (DemaConsulting.SarifMark from dotnet tool list)
sarifmark:
command: dotnet tool list
regex: '(?i)demaconsulting\.sarifmark\s+(?<version>\d+\.\d+\.\d+)'

# SonarMark (DemaConsulting.SonarMark from dotnet tool list)
sonarmark:
command: dotnet tool list
regex: '(?i)demaconsulting\.sonarmark\s+(?<version>\d+\.\d+\.\d+)'

# ReqStream (DemaConsulting.ReqStream from dotnet tool list)
reqstream:
command: dotnet tool list
regex: '(?i)demaconsulting\.reqstream\s+(?<version>\d+\.\d+\.\d+)'

# BuildMark (DemaConsulting.BuildMark from dotnet tool list)
buildmark:
Comment thread
Malcolmnixon marked this conversation as resolved.
command: dotnet tool list
regex: '(?i)demaconsulting\.buildmark\s+(?<version>\d+\.\d+\.\d+)'

# VersionMark (DemaConsulting.VersionMark from dotnet tool list)
versionmark:
command: dotnet tool list
regex: '(?i)demaconsulting\.versionmark\s+(?<version>\d+\.\d+\.\d+)'
1 change: 1 addition & 0 deletions docs/buildnotes/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ input-files:
- docs/buildnotes/title.txt
- docs/buildnotes/introduction.md
- docs/buildnotes.md
- docs/buildnotes/versions.md

template: template.html

Expand Down
Loading