mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Fix telemetry-steps.yml (#4903)
Fix bug in telemetry-steps.yml that causes telemetry setup to be disabled even if TELEMETRYGUID is set.
This commit is contained in:
parent
f34ed3a576
commit
71d8846635
1 changed files with 11 additions and 20 deletions
|
|
@ -2,27 +2,18 @@
|
|||
# variable
|
||||
|
||||
steps:
|
||||
- ${{ if ne(variables.TELEMETRYGUID, '') }}:
|
||||
- task: PythonScript@0
|
||||
displayName: 'Set TelemetryOption variable [telemetry enabled]'
|
||||
inputs:
|
||||
scriptSource: inline
|
||||
script: |
|
||||
print("##vso[task.setvariable variable=TelemetryOption]--use_telemetry")
|
||||
|
||||
- powershell: |
|
||||
- powershell: |
|
||||
if ($env:TELEMETRYGUID) {
|
||||
$length = $env:TELEMETRYGUID.length
|
||||
$fileContent = "#define TraceLoggingOptionMicrosoftTelemetry() \
|
||||
TraceLoggingOptionGroup("+$env:TELEMETRYGUID.substring(1, $length-2)+")"
|
||||
New-Item -Path "$(Build.SourcesDirectory)\include\onnxruntime\core\platform\windows\TraceLoggingConfigPrivate.h" -ItemType "file" -Value "$fileContent" -Force
|
||||
displayName: 'Create TraceLoggingConfigPrivate.h For WinML Telemetry'
|
||||
env:
|
||||
TELEMETRYGUID: $(TELEMETRYGUID)
|
||||
|
||||
- ${{ if eq(variables.TELEMETRYGUID, '') }}:
|
||||
- task: PythonScript@0
|
||||
displayName: 'Set TelemetryOption variable [telemetry disabled]'
|
||||
inputs:
|
||||
scriptSource: inline
|
||||
script: |
|
||||
print("##vso[task.setvariable variable=TelemetryOption]")
|
||||
Write-Host "##vso[task.setvariable variable=TelemetryOption]--use_telemetry"
|
||||
Write-Host "Telemetry is enabled."
|
||||
} else {
|
||||
Write-Host "##vso[task.setvariable variable=TelemetryOption]"
|
||||
Write-Host "Telemetry is disabled."
|
||||
}
|
||||
displayName: 'Set TelemetryOption variable and optionally create TraceLoggingConfigPrivate.h for WinML Telemetry'
|
||||
env:
|
||||
TELEMETRYGUID: $(TELEMETRYGUID)
|
||||
|
|
|
|||
Loading…
Reference in a new issue