File tree Expand file tree Collapse file tree
src/OpenTelemetry.SemanticConventions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -665,6 +665,39 @@ jobs:
665665 run-tests : false # Note: No test project
666666 trigger : ${{ github.event_name }}
667667
668+ verify-semanticconventions :
669+ name : Verify semantic conventions generation
670+ needs : detect-changes
671+ if : |
672+ contains(needs.detect-changes.outputs.changes, 'semanticconventions')
673+ || contains(needs.detect-changes.outputs.changes, 'build')
674+ runs-on : ubuntu-24.04
675+ timeout-minutes : 15
676+ steps :
677+ - name : Checkout code
678+ uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
679+ with :
680+ persist-credentials : false
681+ show-progress : false
682+
683+ - name : Regenerate semantic conventions
684+ shell : pwsh
685+ run : |
686+ Remove-Item -Recurse -Force ./src/OpenTelemetry.SemanticConventions/Attributes
687+ New-Item -ItemType Directory ./src/OpenTelemetry.SemanticConventions/Attributes
688+ ./src/OpenTelemetry.SemanticConventions/scripts/generate.ps1
689+
690+ - name : Verify generated files are up to date
691+ shell : pwsh
692+ run : |
693+ $generatedFiles = git status --short --untracked-files=all -- ./src/OpenTelemetry.SemanticConventions/Attributes
694+ if ($generatedFiles) {
695+ $generatedFiles | Write-Output
696+ Write-Output "Run ./src/OpenTelemetry.SemanticConventions/scripts/generate.ps1 and commit the results."
697+ Write-Error "Generated semantic convention files are out of date."
698+ exit 1
699+ }
700+
668701 build-test-contrib-shared-tests :
669702 needs : detect-changes
670703 if : |
Original file line number Diff line number Diff line change @@ -14,15 +14,9 @@ dotnet add package OpenTelemetry.SemanticConventions --prerelease
1414This project uses
1515[ Weaver] ( https://github.com/open-telemetry/weaver ) .
1616The folder ` scripts ` at the top level of the project contains the template
17- and the script files used in the process.
17+ and PowerShell script used in the process.
1818
19- To generate the code files, run:
20-
21- ``` shell
22- ./scripts/generate.sh
23- ```
24-
25- Or, with PowerShell:
19+ To generate the code files, run the PowerShell script:
2620
2721``` shell
2822./scripts/generate.ps1
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env pwsh
2+
13$SCRIPT_DIR = $PSScriptRoot
24$ROOT_DIR = " ${SCRIPT_DIR} /../"
35
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments