Skip to content

Commit df37d7f

Browse files
committed
Use *.crate package pattern, adjust Pack-Crates.ps1 to create packages in output folders
1 parent 9dd6551 commit df37d7f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$Language = "rust"
22
$LanguageDisplayName = "Rust"
33
$PackageRepository = "crates.io"
4-
$packagePattern = "Cargo.toml"
4+
$packagePattern = "*.crate"
55
#$MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/main/_data/releases/latest/rust-packages.csv"
66
$GithubUri = "https://github.com/Azure/azure-sdk-for-rust"
77
$PackageRepositoryUri = "https://crates.io/crates"
@@ -139,6 +139,7 @@ function Get-rust-AdditionalValidationPackagesFromPackageSet ($packagesWithChang
139139
return $additionalPackages ?? @()
140140
}
141141

142+
# $GetPackageInfoFromPackageFileFn = "Get-${Language}-PackageInfoFromPackageFile"
142143
function Get-rust-PackageInfoFromPackageFile([IO.FileInfo]$pkg, [string]$workingDirectory) {
143144
#$pkg will be a FileInfo object for the Cargo.toml file in a package artifact directory
144145
$package = cargo read-manifest --manifest-path $pkg.FullName | ConvertFrom-Json

eng/scripts/Pack-Crates.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,12 @@ try {
190190

191191
if ($OutputPath -and $package.OutputPackage) {
192192
$sourcePath = "$RepoRoot/target/package/$packageName-$packageVersion"
193-
$targetApiReviewFile = "$OutputPath/$packageName.rust.json"
193+
$targetPath = "$OutputPath/$packageName"
194+
$targetApiReviewFile = "$targetPath/$packageName.rust.json"
194195

195-
Write-Host "Copying package '$packageName' to '$OutputPath'"
196-
New-Item -ItemType Directory -Path $OutputPath -Force | Out-Null
197-
Copy-Item -Path "$sourcePath.crate" -Destination $OutputPath
196+
Write-Host "Copying package '$packageName' to '$targetPath'"
197+
New-Item -ItemType Directory -Path $targetPath -Force | Out-Null
198+
Copy-Item -Path "$sourcePath.crate" -Destination $targetPath
198199

199200
Write-Host "Creating API review file"
200201
$apiReviewFile = Create-ApiViewFile $package

0 commit comments

Comments
 (0)