Skip to content

Commit 49d9f76

Browse files
authored
Trim genai version for dev runs in Nuget packaging (microsoft#1538)
Trim genai version for dev runs in Nuget packaging step and fixes the issue for Nuget packaging output for dev runs. Currently the genai version for dev runs is something like this "0.9.0-dev-423423-da43-d34*" and because of that it doesn't match the file names. We just need to extract the first two parts in the genai version and this PR does the same. Have started test runs to ensure it works properly.
1 parent 31a00fc commit 49d9f76

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.pipelines/stages/jobs/nuget-packaging-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ jobs:
237237
foreach ($file in $artifacts) {
238238
$a = $file.Name
239239
Write-Host "Extracting " $a
240-
$rid_match = $a -match "onnxruntime-genai-$(genai_version)-(.+?)-?(?:cuda|dml)?(\.zip|\.tar\.gz)"
240+
$rid_match = $a -match "onnxruntime-genai-$(genai_version_raw)-(.+?)-?(?:cuda|dml)?(\.zip|\.tar\.gz)"
241241
if ($rid_match) {
242242
$rid = $Matches.1
243243
}
244244
else {
245-
$rid_match = $a -match "onnxruntime-genai-(android|ios)-$(genai_version)(.+?)?(\.zip|\.aar)"
245+
$rid_match = $a -match "onnxruntime-genai-(android|ios)-$(genai_version_raw)(.+?)?(\.zip|\.aar)"
246246
if ($rid_match) {
247247
$rid = $Matches.1
248248
}

.pipelines/stages/jobs/steps/utils/set-genai-version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ steps:
3434
3535
Write-Host "Setting variable: genai_version = ${version}"
3636
Write-Host "##vso[task.setvariable variable=genai_version]${version}"
37+
Write-Host "Setting variable: genai_version_raw = ${version_info}"
38+
Write-Host "##vso[task.setvariable variable=genai_version_raw]${version_info}"

0 commit comments

Comments
 (0)