Skip to content

Commit

Permalink
Testing new builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ClintWeaver committed Apr 13, 2018
1 parent 4e8e66b commit e3dc59b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 32 deletions.
37 changes: 28 additions & 9 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Clean'; Invoke-psake build.psake.ps1 -taskList Clean;",
"Invoke-Command { Write-Host 'Completed Clean task in task runner.' }"
"Write-Host 'Running . .\\build.ps1 -Task Clean' ; . .\\build.ps1 -Task Clean;",
"Invoke-Command { Write-Host 'Completed Build task in task runner.' }"
]
},
{
Expand All @@ -48,7 +48,7 @@
"isBuildCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Running . .\\build.ps1' ; . .\\build.ps1;",
"Write-Host 'Running . .\\build.ps1' -Task Build ; . .\\build.ps1 -Task Build ;",
"Invoke-Command { Write-Host 'Completed Build task in task runner.' }"
]
},
Expand All @@ -57,8 +57,8 @@
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on ct.writelog\build.psake.ps1 -taskList BuildHelp'; Invoke-psake build.psake.ps1 -taskList BuildHelp;; Invoke-psake build.psake.ps1 -taskList BuildUpdatableHelp; ",
"Invoke-Command { Write-Host 'Completed BuildHelp task in task runner.' }"
"Write-Host 'Running . .\\build.ps1' -Task BuildAllHelp ; . .\\build.ps1 -Task BuildAllHelp ;",
"Invoke-Command { Write-Host 'Completed BuildAllHelp task in task runner.' }"
]
},
{
Expand All @@ -79,12 +79,21 @@
"Invoke-Command { Write-Host 'Completed BuildUpdatableHelp task in task runner.' }"
]
},
{
"taskName": "BuildAndPublish",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Running . .\\build.ps1 -task BuildAndPublish' ; . .\\build.ps1 -task BuildAndPublish;",
"Invoke-Command { Write-Host 'Completed BuildAndPublish task in task runner.' }"
]
},
{
"taskName": "Analyze",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Analyze'; Invoke-psake build.psake.ps1 -taskList Analyze;",
"Write-Host 'Running . .\\build.ps1 -task Analyze' ; . .\\build.ps1 -task Analyze;",
"Invoke-Command { Write-Host 'Completed Analyze task in task runner.' }"
]
},
Expand All @@ -93,7 +102,7 @@
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Install'; Invoke-psake build.psake.ps1 -taskList Install;",
"Write-Host 'Running . .\\build.ps1 -task Install' ; . .\\build.ps1 -task Install;",
"Invoke-Command { Write-Host 'Completed Install task in task runner.' }"
]
},
Expand All @@ -102,7 +111,7 @@
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Publish'; Invoke-psake build.psake.ps1 -taskList Publish;",
"Write-Host 'Running . .\\build.ps1 -task Publish' ; . .\\build.ps1 -task Publish;",
"Invoke-Command { Write-Host 'Completed Publish task in task runner.' }"
]
},
Expand All @@ -112,7 +121,17 @@
"isTestCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking Pester'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
"Write-Host 'Running . .\\build.ps1 -task Pester' ; . .\\build.ps1 -task Pester;",
"Invoke-Command { Write-Host 'Completed Pester task in task runner.' }"
]
},
{
"taskName": "TestNotUsed",
"suppressTaskName": true,
"isTestCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking Pester'; Invoke-Pester -Path Tests\\*unit* -PesterOption @{IncludeVSCodeMarker=$true};",
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
],
"problemMatcher": [
Expand Down
8 changes: 5 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Derived from scripts written by Warren F. (RamblingCookieMonster)
[cmdletbinding()]
param ($Task = 'Default')

Write-Output "Starting build"
Write-Output "Starting $Task task"


if (-not (Get-PackageProvider | Where-Object Name -eq nuget)) {
Write-Output " Install Nuget PS package provider"
Expand All @@ -17,7 +18,7 @@ if (-not (Get-PackageProvider | Where-Object Name -eq nuget)) {
$publishRepository = 'PSGallery'

# Grab nuget bits, install modules, set build variables, start build.
Write-Output " Install And Import Build Modules"
Write-Output " Installing And Importing Build Modules"
$psDependVersion = '0.1.62'
if (-not(Get-InstalledModule PSDepend -RequiredVersion $psDependVersion -EA SilentlyContinue)) {
Install-Module PSDepend -RequiredVersion $psDependVersion -Force -Scope CurrentUser
Expand All @@ -26,12 +27,13 @@ Import-Module PSDepend -RequiredVersion $psDependVersion
Invoke-PSDepend -Path "$PSScriptRoot\build.depend.psd1" -Install -Import -Force

if (-not (Get-Item env:\BH*)) {
Write-Output " Getting build variables"
Set-BuildEnvironment
Set-Item env:\PublishRepository -Value $publishRepository
}
. "$PSScriptRoot\tests\Unload-SUT.ps1"

Write-Output " InvokeBuild"
Write-Output " Running Invoke-Build $Task"
Invoke-Build $Task -Result result
if ($Result.Error) {
exit 1
Expand Down
10 changes: 10 additions & 0 deletions module.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ Task Build InstallSUT, CopyToOutput, BuildPSM1, BuildPSD1
Task Pester Build, UnitTests, FullTests
Task BuildHelp Build, GenerateMarkdown, GenerateHelpFiles
Task BuildUpdatableHelp BuildHelp, CoreBuildUpdatableHelp
Task BuildAllHelp BuildHelp, BuildUpdatableHelp


Task Analyze {
Write-Output "The Analyze... it does nothing!"
}

Task Install {
Write-Output "The Install... it does nothing! At some point, it may copy the module to a default module location"
}

function CalculateFingerprint {
param(
Expand Down
10 changes: 0 additions & 10 deletions tests/CT.WriteLog.Tests.ps1

This file was deleted.

10 changes: 0 additions & 10 deletions tests/Shared.ps1

This file was deleted.

0 comments on commit e3dc59b

Please sign in to comment.