Skip to content

Commit ba97e27

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
Default build to crates.io
1 parent 86c3ef6 commit ba97e27

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ param(
1515
[switch]$GetPackageVersion,
1616
[switch]$SkipLinkCheck,
1717
[switch]$UseX64MakeAppx,
18-
[switch]$UseCratesIO,
18+
[switch]$UseCFS,
1919
[switch]$UpdateLockFile,
2020
[switch]$Audit,
2121
[switch]$UseCFSAuth,
@@ -290,12 +290,7 @@ if (!$SkipBuild) {
290290
}
291291
New-Item -ItemType Directory $target -ErrorAction Ignore > $null
292292

293-
if ($UseCratesIO) {
294-
# this will override the config.toml
295-
Write-Host "Setting CARGO_SOURCE_crates-io_REPLACE_WITH to 'crates-io'"
296-
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = 'CRATESIO'
297-
$env:CARGO_REGISTRIES_CRATESIO_INDEX = 'sparse+https://index.crates.io/'
298-
} else {
293+
if ($UseCFS -or $UseCFSAuth -or $usingADO) {
299294
Write-Host "Using CFS for cargo source replacement"
300295
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = $null
301296
$env:CARGO_REGISTRIES_CRATESIO_INDEX = $null
@@ -321,6 +316,11 @@ if (!$SkipBuild) {
321316
Write-Warning "Azure CLI not found, proceeding with anonymous access."
322317
}
323318
}
319+
} else {
320+
# this will override the config.toml
321+
Write-Host "Setting CARGO_SOURCE_crates-io_REPLACE_WITH to 'crates-io'"
322+
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = 'CRATESIO'
323+
$env:CARGO_REGISTRIES_CRATESIO_INDEX = 'sparse+https://index.crates.io/'
324324
}
325325

326326
# make sure dependencies are built first so clippy runs correctly

0 commit comments

Comments
 (0)