Skip to content

Commit 5ac1abe

Browse files
author
Github Actions
committed
Refactor PSBuild module to reorganize module variables and PowerShell preferences. Moved variable definitions and preferences to a new section for improved clarity and maintainability.
1 parent fda8758 commit 5ac1abe

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

scripts/PSBuild.psm1

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,6 @@
99
# Set Strict Mode
1010
Set-StrictMode -Version Latest
1111

12-
#region Module Variables
13-
$script:DOTNET_VERSION = '9.0'
14-
$script:LICENSE_TEMPLATE = Join-Path $PSScriptRoot "LICENSE.template"
15-
16-
# Set PowerShell preferences
17-
$ErrorActionPreference = 'Stop'
18-
$WarningPreference = 'Stop'
19-
$InformationPreference = 'Continue'
20-
$DebugPreference = 'Ignore'
21-
$VerbosePreference = 'Ignore'
22-
$ProgressPreference = 'Ignore'
23-
24-
# Get the line ending for the current system
25-
$script:lineEnding = Get-GitLineEnding
26-
#endregion
27-
2812
#region Environment and Configuration
2913

3014
function Initialize-BuildEnvironment {
@@ -1944,3 +1928,19 @@ Export-ModuleMember -Function Assert-LastExitCode,
19441928
Export-ModuleMember -Function Invoke-BuildWorkflow,
19451929
Invoke-ReleaseWorkflow,
19461930
Invoke-CIPipeline
1931+
1932+
#region Module Variables
1933+
$script:DOTNET_VERSION = '9.0'
1934+
$script:LICENSE_TEMPLATE = Join-Path $PSScriptRoot "LICENSE.template"
1935+
1936+
# Set PowerShell preferences
1937+
$ErrorActionPreference = 'Stop'
1938+
$WarningPreference = 'Stop'
1939+
$InformationPreference = 'Continue'
1940+
$DebugPreference = 'Ignore'
1941+
$VerbosePreference = 'Ignore'
1942+
$ProgressPreference = 'Ignore'
1943+
1944+
# Get the line ending for the current system
1945+
$script:lineEnding = Get-GitLineEnding
1946+
#endregion

0 commit comments

Comments
 (0)