File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed
Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 44
55 # Version number of this module.
66
7- ModuleVersion = ' 2.2.35 '
7+ ModuleVersion = ' 2.2.38 '
88
99 # ID used to uniquely identify this module
1010 GUID = ' 9ef51588-c40c-4064-910d-9b624b758cf6'
Original file line number Diff line number Diff line change 2828 $Levels = (Get-PSFConfigValue - FullName ' PSUtil.Path.BackupStepsDefault' - Fallback 1 )
2929 )
3030
31- Set-Location - Path (, " .." * $Levels | Join-String - With ([System.IO.Path ]::DirectorySeparatorChar))
31+ Set-Location - Path (, " .." * $Levels | Join-String - Separator ([System.IO.Path ]::DirectorySeparatorChar))
3232}
3333
3434Import-PSUAlias - Name " bu" - Command " Backup-PSULocation"
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ param (
1010 $WorkingDirectory = $env: SYSTEM_DEFAULTWORKINGDIRECTORY
1111)
1212
13+ # region Handle Working Directory Defaults
14+ if (-not $WorkingDirectory )
15+ {
16+ if ($env: RELEASE_PRIMARYARTIFACTSOURCEALIAS )
17+ {
18+ $WorkingDirectory = Join-Path - Path $env: SYSTEM_DEFAULTWORKINGDIRECTORY - ChildPath $env: RELEASE_PRIMARYARTIFACTSOURCEALIAS
19+ }
20+ else { $WorkingDirectory = $env: SYSTEM_DEFAULTWORKINGDIRECTORY }
21+ }
22+ if (-not $WorkingDirectory ) { $WorkingDirectory = Split-Path $PSScriptRoot }
23+ # endregion Handle Working Directory Defaults
24+
1325# Prepare publish folder
1426Write-PSFMessage - Level Important - Message " Creating and populating publishing directory"
1527$publishDir = New-Item - Path $WorkingDirectory - Name publish - ItemType Directory - Force
Original file line number Diff line number Diff line change @@ -10,9 +10,22 @@ param (
1010 $WorkingDirectory = $env: SYSTEM_DEFAULTWORKINGDIRECTORY
1111)
1212
13+ # region Handle Working Directory Defaults
14+ if (-not $WorkingDirectory )
15+ {
16+ if ($env: RELEASE_PRIMARYARTIFACTSOURCEALIAS )
17+ {
18+ $WorkingDirectory = Join-Path - Path $env: SYSTEM_DEFAULTWORKINGDIRECTORY - ChildPath $env: RELEASE_PRIMARYARTIFACTSOURCEALIAS
19+ }
20+ else { $WorkingDirectory = $env: SYSTEM_DEFAULTWORKINGDIRECTORY }
21+ }
22+ if (-not $WorkingDirectory ) { $WorkingDirectory = Split-Path $PSScriptRoot }
23+ # endregion Handle Working Directory Defaults
24+
1325# Prepare publish folder
1426Write-PSFMessage - Level Important - Message " Creating and populating publishing directory"
15- $publishDir = New-Item - Path $WorkingDirectory - Name publish - ItemType Directory
27+ $publishDir = New-Item - Path $WorkingDirectory - Name publish - ItemType Directory - Force
28+ Remove-Item - Path " $publishDir \*" - Recurse - Force - ErrorAction SilentlyContinue
1629Copy-Item - Path " $ ( $WorkingDirectory ) \PSUtil" - Destination $publishDir.FullName - Recurse - Force
1730
1831# region Gather text data to compile
You can’t perform that action at this time.
0 commit comments