File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,15 +12,16 @@ if (-not $env:SYSTEM_DEFAULTWORKINGDIRECTORY)
1212# Prepare build folder
1313$item = New-Item - Path $env: TEMP - Name " Build" - ItemType Directory - Force
1414Write-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"
1617
1718# Build Templates
1819Write-PSFMessage - Level Host - Message " Building templates"
1920Write-PSFMessage - Level Host - Message " Creating root folder"
2021$templateBuild = New-Item - Path $item.FullName - Name " Templates" - ItemType Directory - Force
2122Write-PSFMessage - Level Host - Message " Executing package compilation"
2223& " $ ( $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"
2425Copy-Item - Path " $ ( $templateBuild.FullName ) \output\*" - Destination " $ ( $item.FullName ) \PSModuleDevelopment\internal\templates" - Force
2526
2627# Publish to gallery
@@ -29,4 +30,5 @@ if ($env:BUILD_BUILDURI -like "vstfs*")
2930 Write-PSFMessage - Level Host - Message " Publishing to gallery"
3031 if ($WhatIf -or -not $ApiKey ) { Publish-Module - Path " $ ( $env: SYSTEM_DEFAULTWORKINGDIRECTORY ) \PSModuleDevelopment" - NuGetApiKey $ApiKey - Force - WhatIf }
3132 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