mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
Fail windows bundle when cargo about fails (#48056)
Release Notes: - N/A
This commit is contained in:
parent
fe653a77ae
commit
a6ab1f1eb7
2 changed files with 16 additions and 7 deletions
|
|
@ -96,10 +96,7 @@ function PrepareForBundle {
|
|||
}
|
||||
|
||||
function GenerateLicenses {
|
||||
$oldErrorActionPreference = $ErrorActionPreference
|
||||
$ErrorActionPreference = 'Continue'
|
||||
. $PSScriptRoot/generate-licenses.ps1
|
||||
$ErrorActionPreference = $oldErrorActionPreference
|
||||
}
|
||||
|
||||
function BuildZedAndItsFriends {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
$ErrorActionPreference = 'Stop'
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
|
||||
$CARGO_ABOUT_VERSION="0.8.2"
|
||||
$outputFile=$args[0] ? $args[0] : "$(Get-Location)/assets/licenses.md"
|
||||
$templateFile="script/licenses/template.md.hbs"
|
||||
|
|
@ -12,12 +15,21 @@ New-Item -Path "$outputFile" -ItemType File -Value "" -Force
|
|||
"\n# ###### CODE LICENSES ######\n"
|
||||
) | Add-Content -Path $outputFile
|
||||
|
||||
$versionOutput = cargo about --version
|
||||
if (-not ($versionOutput -match "cargo-about $CARGO_ABOUT_VERSION")) {
|
||||
$needsInstall = $false
|
||||
try {
|
||||
$versionOutput = cargo about --version
|
||||
if (-not ($versionOutput -match "cargo-about $CARGO_ABOUT_VERSION")) {
|
||||
$needsInstall = $true
|
||||
} else {
|
||||
Write-Host "cargo-about@$CARGO_ABOUT_VERSION is already installed"
|
||||
}
|
||||
} catch {
|
||||
$needsInstall = $true
|
||||
}
|
||||
|
||||
if ($needsInstall) {
|
||||
Write-Host "Installing cargo-about@$CARGO_ABOUT_VERSION..."
|
||||
cargo install "cargo-about@$CARGO_ABOUT_VERSION"
|
||||
} else {
|
||||
Write-Host "cargo-about@$CARGO_ABOUT_VERSION" is already installed
|
||||
}
|
||||
|
||||
Write-Host "Generating cargo licenses"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue