Skip to content

Commit d08ab52

Browse files
Fix pathes in agent publish step (#4977)
1 parent 406f4f8 commit d08ab52

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.vsts.release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,14 @@ extends:
258258
259259
Get-ChildItem -LiteralPath "$(System.ArtifactsDirectory)/agent" | ForEach-Object {
260260
$target=$_
261-
$FullPath = $target.FullName
262-
Get-ChildItem -LiteralPath "$FullPath" -Include "*.zip","*.tar.gz" | ForEach-Object {
261+
$fullPath = $target.FullName
262+
Get-ChildItem -LiteralPath "$fullPath" -Include "*.zip","*.tar.gz" | ForEach-Object {
263263
$executable = $_
264-
Write-Host "Uploading $executable to BlobStorage vstsagentpackage/$container/$versionDir"
265-
Set-AzStorageBlobContent -Context $storageContext -Container $container -File "$(System.ArtifactsDirectory)/agent/$target/$executable" -Blob "$versionDir/$executable" -Force
266-
$uploadFiles.Add("/$container/$versionDir/$executable")
264+
$execFullPath = $executable.FullName
265+
$execName = $executable.Name
266+
Write-Host "Uploading $execName to BlobStorage vstsagentpackage/$container/$versionDir"
267+
Set-AzStorageBlobContent -Context $storageContext -Container $container -File "$execFullPath" -Blob "$versionDir/$execName" -Force
268+
$uploadFiles.Add("/$container/$versionDir/$execName")
267269
}
268270
}
269271
Write-Host "Purge Azure CDN Cache"

0 commit comments

Comments
 (0)