File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,16 @@ if (-not $env:SYSTEM_DEFAULTWORKINGDIRECTORY)
12
12
# Prepare build folder
13
13
$item = New-Item - Path $env: TEMP - Name " Build" - ItemType Directory - Force
14
14
Write-PSFMessage - Level Host - Message " Building in $ ( $item.FullName ) "
15
- Copy-Item - Path " $ ( $env: SYSTEM_DEFAULTWORKINGDIRECTORY ) \PSModuleDevelopment" - Destination $item.FullName - Recurse
15
+ Copy-Item - Path " $ ( $env: SYSTEM_DEFAULTWORKINGDIRECTORY ) \PSModuleDevelopment" - Destination " $ ( $item.FullName ) \" - Recurse
16
+ Import-Module " $ ( $item.FullName ) \PSModuleDevelopment\PSModuleDevelopment.psd1"
16
17
17
18
# Build Templates
18
19
Write-PSFMessage - Level Host - Message " Building templates"
19
20
Write-PSFMessage - Level Host - Message " Creating root folder"
20
21
$templateBuild = New-Item - Path $item.FullName - Name " Templates" - ItemType Directory - Force
21
22
Write-PSFMessage - Level Host - Message " Executing package compilation"
22
23
& " $ ( $env: SYSTEM_DEFAULTWORKINGDIRECTORY ) \templates\build.ps1" - Path $templateBuild.FullName
23
- Write-PSFMessage - Level Host - Message " Merging tempalte packages into build"
24
+ Write-PSFMessage - Level Host - Message " Merging template packages into build"
24
25
Copy-Item - Path " $ ( $templateBuild.FullName ) \output\*" - Destination " $ ( $item.FullName ) \PSModuleDevelopment\internal\templates" - Force
25
26
26
27
# Publish to gallery
@@ -29,4 +30,5 @@ if ($env:BUILD_BUILDURI -like "vstfs*")
29
30
Write-PSFMessage - Level Host - Message " Publishing to gallery"
30
31
if ($WhatIf -or -not $ApiKey ) { Publish-Module - Path " $ ( $env: SYSTEM_DEFAULTWORKINGDIRECTORY ) \PSModuleDevelopment" - NuGetApiKey $ApiKey - Force - WhatIf }
31
32
else { Publish-Module - Path " $ ( $env: SYSTEM_DEFAULTWORKINGDIRECTORY ) \PSModuleDevelopment" - NuGetApiKey $ApiKey - Force }
32
- }
33
+ }
34
+ else { Write-PSFMessage - Level Host - Message " Skipping publish to gallery" }
You can’t perform that action at this time.
0 commit comments