mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-09 00:30:53 +00:00
Here's the motivating issue: https://github.com/microsoft/azure-pipelines-tasks/issues/10331 Noticed some problems in other repos so also updating usages in ORT. We may be fine now without it, but this change adds some safeguard against future additions of 'set -x' for debugging.
42 lines
1.7 KiB
YAML
42 lines
1.7 KiB
YAML
parameters:
|
|
packageFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
steps:
|
|
- task: CmdLine@2
|
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
|
displayName: 'Extract version number from the NuPkg file, Windows VMs'
|
|
inputs:
|
|
workingDirectory: '${{ parameters.packageFolder }}'
|
|
script: |
|
|
SETLOCAL EnableDelayedExpansion
|
|
FOR /R %%i IN (Microsoft.ML.OnnxRuntime.Managed*.nupkg) do (
|
|
set filename=%%~ni
|
|
set ortversion=!filename:~33!
|
|
@echo ortversion is !ortversion!
|
|
@echo ##vso[task.setvariable variable=NuGetPackageVersionNumber;]!ortversion!
|
|
)
|
|
- task: CmdLine@2
|
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
|
displayName: 'Extract version number from the DirectML NuPkg file, Windows VMs'
|
|
inputs:
|
|
workingDirectory: '${{ parameters.packageFolder }}'
|
|
script: |
|
|
SETLOCAL EnableDelayedExpansion
|
|
FOR /R %%i IN (Microsoft.ML.OnnxRuntime.DirectML*.nupkg) do (
|
|
set filename=%%~ni
|
|
set ortversion=!filename:~34!
|
|
@echo DirectMLNuGetPackageVersionNumber is !ortversion!
|
|
@echo ##vso[task.setvariable variable=DirectMLNuGetPackageVersionNumber;]!ortversion!
|
|
)
|
|
- task: CmdLine@2
|
|
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
|
|
displayName: 'Extract version number from the NuPkg file, Unix VMs'
|
|
inputs:
|
|
workingDirectory: '${{ parameters.packageFolder }}'
|
|
script: |
|
|
filenamewithext=$(ls Microsoft.ML.OnnxRuntime.Managed*nupkg)
|
|
filename=${filenamewithext%.*}
|
|
ortversion=${filename:33}
|
|
# Do not output ##vso[] commands with `set -x` or they may be parsed again and include a trailing quote.
|
|
set +x
|
|
echo "##vso[task.setvariable variable=NuGetPackageVersionNumber;]$ortversion"
|