b#48614111: Add "break on error" setting to the top of powershell scripts in WASDK (#4529)
* 48614111: draft 1 * 48614111: use 'Set-StrictMode -Version 1.0' in Generate-TerminalVelocityFeatures.ps1 * 48614111: upcated Generate-TerminalVelocityFeatures.ps1 * 48614111: cleaned away unintended blank lines * 48614111: add workaround to CopyFilesToStagingDir.ps1 * 48614111: moved workaround in CopyFilesToStagingDir.ps1 to BuildAll.ps1
This commit is contained in:
Родитель
f753170ead
Коммит
517707ae8e
|
@ -27,6 +27,9 @@ Param(
|
|||
[switch]$Clean = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$env:Build_SourcesDirectory = (Split-Path $MyInvocation.MyCommand.Path)
|
||||
$buildOverridePath = "build\override"
|
||||
$BasePath = "BuildOutput/FullNuget"
|
||||
|
@ -288,7 +291,10 @@ Try {
|
|||
{
|
||||
foreach($platformToRun in $platform.Split(","))
|
||||
{
|
||||
# TODO: $windowsAppSdkBinariesPath may not be defined. Remove the temp downgrade to 1.0 once this issue has been fixed (b#52130179).
|
||||
Set-StrictMode -Version 1.0
|
||||
.\build\CopyFilesToStagingDir.ps1 -BuildOutputDir 'BuildOutput' -OverrideDir "$buildOverridePath" -PublishDir "$windowsAppSdkBinariesPath" -NugetDir "$BasePath" -Platform $PlatformToRun -Configuration $ConfigurationToRun
|
||||
Set-StrictMode -Version 3.0
|
||||
if ($lastexitcode -ne 0)
|
||||
{
|
||||
write-host "ERROR: msCopyFilesToStagingDir.ps1 FAILED."
|
||||
|
|
|
@ -72,6 +72,7 @@ param(
|
|||
$StartTime = Get-Date
|
||||
$lastexitcode = 0
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
function Get-Tests
|
||||
{
|
||||
|
|
|
@ -9,6 +9,9 @@ Param(
|
|||
[switch]$PublishAppxFiles=$false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$FullBuildOutput = "$($BuildOutputDir)\$($Configuration)\$($Platform)"
|
||||
$FullPublishDir = "$($PublishDir)\$($Configuration)\$($Platform)"
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@ Param(
|
|||
# Version is read from the VERSION file.
|
||||
#
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$scriptDirectory = $script:MyInvocation.MyCommand.Path | Split-Path -Parent
|
||||
|
||||
pushd $scriptDirectory
|
||||
|
|
|
@ -24,6 +24,9 @@ function AllChangedFilesAreSkippable
|
|||
return $allFilesAreSkippable
|
||||
}
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$shouldSkipBuild = $false
|
||||
|
||||
if($env:BUILD_REASON -eq "PullRequest")
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
[parameter(mandatory)][string] $OutputDirectory
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
function Get-Is64Bit
|
||||
{
|
||||
|
|
|
@ -5,6 +5,9 @@ Param(
|
|||
[string]$packageConfigPath = ""
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
[xml]$buildConfig = Get-Content -Path $versionDetailsPath
|
||||
|
||||
$packagesText =
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
param([Parameter(Mandatory=$true, Position=0)]
|
||||
[string]$buildNumber)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
|
||||
# Ensure the error action preference is set to the default for PowerShell3, 'Stop'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
|
|
|
@ -7,10 +7,9 @@ param(
|
|||
[string]$SdkVersion = $null
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
|
||||
|
||||
function Install-EXE
|
||||
{
|
||||
Param
|
||||
|
|
|
@ -4,6 +4,9 @@ param(
|
|||
[switch]$skipLKG
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$dotnetInstallScript = "$env:TEMP\dotnet-install.ps1"
|
||||
|
||||
$repoInstallDir = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\.dotnet")
|
||||
|
|
|
@ -6,6 +6,9 @@ param(
|
|||
|
||||
Import-Module -Name $PSScriptRoot\MSBuildFunctions.psm1 -DisableNameChecking
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# Check if the VS cmd prompt is a valid one
|
||||
$msbuildUpToDate = Test-MSBuild (Join-Path $env:VSINSTALLDIR "MSBuild\Current\Bin\msbuild.exe")
|
||||
if (-not $msbuildUpToDate)
|
||||
|
|
|
@ -5,6 +5,9 @@ Param(
|
|||
[string]$packageConfigPath = ""
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
[xml]$buildConfig = Get-Content -Path $versionDetailsPath
|
||||
|
||||
$packagesText =
|
||||
|
|
|
@ -3,6 +3,7 @@ param
|
|||
[String] $SourceDirectory
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# If $env:LkgVcToolsName and $env:LkgVcToolsVersion are not fully specified, try to retrieve the defaults from WindowsAppSDK-GlobalVariables.yml.
|
||||
|
|
|
@ -6,6 +6,9 @@ Param(
|
|||
[string]$queryParameters
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$headers = @{
|
||||
Authorization="Bearer $token"
|
||||
}
|
||||
|
|
|
@ -79,3 +79,6 @@ function IsMaestroFriendlyAzureDevOpUri([string]$buildRepositoryUri)
|
|||
}
|
||||
return $false
|
||||
}
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
|
|
@ -7,6 +7,9 @@ Param(
|
|||
[string]$queryParameters = ''
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$headers = @{
|
||||
Authorization="Bearer $token"
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ Param(
|
|||
[switch] $preProductionEnviroment
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$ProjectName = 'WindowsAppSDK'
|
||||
|
||||
$endPoint = "https://symbolrequestprod.trafficmanager.net/projects/$ProjectName/requests"
|
||||
|
|
|
@ -3,6 +3,7 @@ param(
|
|||
[parameter(mandatory)][string] $OutputDirectory
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
function Get-IsAmd64Bit
|
||||
{
|
||||
|
|
|
@ -4,6 +4,9 @@ Param(
|
|||
[string]$dependencyVersion
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Write-Host $dependencyName
|
||||
Write-Host $dependencyVersion
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@ Param(
|
|||
[int]$ProductMinor
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# Don't output file with Bom
|
||||
$utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ function Convert-Guid
|
|||
return $guid
|
||||
}
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if (-not(Test-Path -Path $Path -PathType Container))
|
||||
{
|
||||
Write-Host "Creating $Path..."
|
||||
|
|
|
@ -28,6 +28,9 @@ function Convert-Guid
|
|||
return $guid
|
||||
}
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if (-not(Test-Path -Path $Path -PathType Container))
|
||||
{
|
||||
Write-Host "Creating $Path..."
|
||||
|
|
|
@ -46,6 +46,8 @@ Param(
|
|||
[string]$Namespace
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
|
||||
# Make sure Channel has the exact spelling even if the parameter had different case
|
||||
foreach ($c in "Experimental", "Preview", "Stable", "WindowsInbox")
|
||||
{
|
||||
|
@ -93,6 +95,9 @@ Class Feature
|
|||
{
|
||||
$this.Name = $entry.name
|
||||
$this.State = ConvertTo-FeatureState $entry.state
|
||||
|
||||
# TODO: Remove the temp workaround of downgrading to StrictModel 1.0 once b#52128443 is fixed.
|
||||
Set-StrictMode -Version 1.0
|
||||
$this.Id = $entry.id
|
||||
$this.ChannelTokenStates = [System.Collections.Generic.Dictionary[string, State]]::new()
|
||||
$this.DisabledReleaseToken = $Null -Ne $entry.alwaysDisabledReleaseTokens
|
||||
|
@ -107,6 +112,7 @@ Class Feature
|
|||
{
|
||||
$this.ChannelTokenStates[$b] = [State]::AlwaysEnabled
|
||||
}
|
||||
Set-StrictMode -Version 3.0
|
||||
}
|
||||
|
||||
[string] PreprocessorName([string]$namespace)
|
||||
|
|
|
@ -13,6 +13,9 @@ Param(
|
|||
[switch]$Fix = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 3.0
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$copyrightHeaderText = (
|
||||
"Copyright (c) Microsoft Corporation and Contributors.",
|
||||
"Licensed under the MIT License."
|
||||
|
|
Загрузка…
Ссылка в новой задаче