|
7 | 7 | [Parameter(ParameterSetName = 'Named')] |
8 | 8 | [string[]]$PackageNames, |
9 | 9 | [Parameter(ParameterSetName = 'PackageInfo')] |
10 | | - [string]$PackageInfoDirectory |
| 10 | + [string]$PackageInfoDirectory, |
| 11 | + [switch]$NoVerify |
11 | 12 | ) |
12 | 13 |
|
13 | 14 | $ErrorActionPreference = 'Stop' |
@@ -138,7 +139,7 @@ function Add-CrateToLocalRegistry($LocalRegistryPath, $Package) { |
138 | 139 | # create an index entry for the package |
139 | 140 | $packagePath = "$RepoRoot/target/package/$packageName-$packageVersion" |
140 | 141 |
|
141 | | - Write-Host "Copying package '$packageName' to '$destination'" |
| 142 | + Write-Host "Copying package '$packageName' to vendor directory '$LocalRegistryPath'" |
142 | 143 | Copy-Item -Path $packagePath -Destination $LocalRegistryPath -Recurse |
143 | 144 |
|
144 | 145 | #write an empty checksum file |
@@ -187,15 +188,21 @@ try { |
187 | 188 | $type = if ($package.OutputPackage) { "output" } else { "dependency" } |
188 | 189 | Write-Host " $packageName ($type)" |
189 | 190 | } |
190 | | - Write-Host "" |
191 | 191 |
|
192 | 192 | foreach ($package in $packages) { |
| 193 | + Write-Host "" |
| 194 | + |
193 | 195 | $packageName = $package.name |
194 | 196 | $packageVersion = $package.version |
195 | 197 |
|
196 | | - Invoke-LoggedCommand ` |
197 | | - -GroupOutput ` |
198 | | - -Command "cargo publish --locked --dry-run --package $packageName --registry crates-io --config `"source.crates-io.replace-with='local'`" --config `"source.local.directory='$localRegistryPath'`" --allow-dirty" |
| 198 | + $command = "cargo publish --locked --dry-run --package $packageName --registry crates-io --config `"source.crates-io.replace-with='local'`" --config `"source.local.directory='$localRegistryPath'`" --allow-dirty" |
| 199 | + |
| 200 | + if ($NoVerify) { |
| 201 | + $command += " --no-verify" |
| 202 | + } |
| 203 | + |
| 204 | + Invoke-LoggedCommand -Command $command -GroupOutput |
| 205 | + |
199 | 206 |
|
200 | 207 | # copy the package to the local registry |
201 | 208 | Add-CrateToLocalRegistry ` |
|
0 commit comments