Skip to content

Commit dbe4857

Browse files
committed
Rough changes to Pack-Crates.ps1 to produce .crate files
1 parent 7e36680 commit dbe4857

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

eng/scripts/Pack-Crates.ps1

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,18 @@ try {
183183

184184
Invoke-LoggedCommand -Command $command -GroupOutput
185185

186-
187186
# copy the package to the local registry
188187
Add-CrateToLocalRegistry `
189188
-LocalRegistryPath $localRegistryPath `
190189
-Package $package
191190

192191
if ($OutputPath -and $package.OutputPackage) {
193192
$sourcePath = "$RepoRoot/target/package/$packageName-$packageVersion"
194-
$targetPath = "$OutputPath/$packageName"
195-
$targetContentsPath = "$targetPath/contents"
196-
$targetApiReviewFile = "$targetPath/$packageName.rust.json"
197-
198-
if (Test-Path -Path $targetContentsPath) {
199-
Remove-Item -Path $targetContentsPath -Recurse -Force
200-
}
193+
$targetApiReviewFile = "$OutputPath/$packageName.rust.json"
201194

202-
Write-Host "Copying package '$packageName' to '$targetContentsPath'"
203-
New-Item -ItemType Directory -Path $targetContentsPath -Force | Out-Null
204-
Copy-Item -Path $sourcePath/* -Destination $targetContentsPath -Recurse -Exclude "Cargo.toml.orig"
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
205198

206199
Write-Host "Creating API review file"
207200
$apiReviewFile = Create-ApiViewFile $package

0 commit comments

Comments
 (0)