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 4
4
5
5
# Version number of this module.
6
6
7
- ModuleVersion = ' 2.2.35 '
7
+ ModuleVersion = ' 2.2.38 '
8
8
9
9
# ID used to uniquely identify this module
10
10
GUID = ' 9ef51588-c40c-4064-910d-9b624b758cf6'
Original file line number Diff line number Diff line change 28
28
$Levels = (Get-PSFConfigValue - FullName ' PSUtil.Path.BackupStepsDefault' - Fallback 1 )
29
29
)
30
30
31
- Set-Location - Path (, " .." * $Levels | Join-String - With ([System.IO.Path ]::DirectorySeparatorChar))
31
+ Set-Location - Path (, " .." * $Levels | Join-String - Separator ([System.IO.Path ]::DirectorySeparatorChar))
32
32
}
33
33
34
34
Import-PSUAlias - Name " bu" - Command " Backup-PSULocation"
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ param (
10
10
$WorkingDirectory = $env: SYSTEM_DEFAULTWORKINGDIRECTORY
11
11
)
12
12
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
+
13
25
# Prepare publish folder
14
26
Write-PSFMessage - Level Important - Message " Creating and populating publishing directory"
15
27
$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 (
10
10
$WorkingDirectory = $env: SYSTEM_DEFAULTWORKINGDIRECTORY
11
11
)
12
12
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
+
13
25
# Prepare publish folder
14
26
Write-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
16
29
Copy-Item - Path " $ ( $WorkingDirectory ) \PSUtil" - Destination $publishDir.FullName - Recurse - Force
17
30
18
31
# region Gather text data to compile
You can’t perform that action at this time.
0 commit comments