Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 7 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
]
},
"demaconsulting.reqstream": {
"version": "1.1.0",
"version": "1.2.0",
"commands": [
"reqstream"
]
Expand All @@ -43,6 +43,12 @@
"commands": [
"buildmark"
]
},
"demaconsulting.versionmark": {
"version": "0.1.0",
"commands": [
"versionmark"
]
}
}
}
4 changes: 4 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"words": [
"Anson",
"Blockquotes",
"buildmark",
"BuildMark",
"buildnotes",
"camelcase",
"CodeQL",
Expand Down Expand Up @@ -66,6 +68,8 @@
"trx",
"vbproj",
"vcxproj",
"versionmark",
"VersionMark",
"Weasyprint",
"weasyprinttool",
"yamllint"
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ 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..."
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 @@ -118,6 +139,23 @@ 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,10 @@ 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 @@ -269,6 +318,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 integration test results
if: always()
uses: actions/upload-artifact@v6
Expand Down Expand Up @@ -312,6 +378,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: Setup dotnet
uses: actions/setup-dotnet@v5
with:
Expand All @@ -332,6 +405,14 @@ jobs:
- name: Restore Tools
run: dotnet tool restore

- 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 reqstream buildmark versionmark
echo "✓ Tool versions captured"

- name: Generate Requirements Report and Trace Matrix
run: >
dotnet reqstream
Expand Down Expand Up @@ -461,6 +542,20 @@ jobs:
exit 1
fi

- 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: Generate Build Notes HTML with Pandoc
shell: bash
run: >
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ docs/justifications/*.html
docs/quality/sonar-quality.md
docs/quality/codeql-quality.md
docs/quality/*.html
docs/buildnotes/versions.md
66 changes: 66 additions & 0 deletions .versionmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# 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 - checks global installation since it installs itself globally
# Note: Different from template - uses --global flag like BuildMark
sonarmark:
command: dotnet tool list --global
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:
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