Skip to content

Commit c09fc4c

Browse files
author
Friedrich Weinmann
committed
Updated tests, included build scripts
1 parent bcad7ec commit c09fc4c

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

PSModuleDevelopment/tests/pester.ps1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@
1212
)
1313

1414
Write-Host "Starting Tests" -ForegroundColor Green
15-
Write-Host "Installing Pester" -ForegroundColor Cyan
16-
if ($env:BUILD_BUILDURI -like "vstfs*") { Install-Module Pester -Force -SkipPublisherCheck }
15+
if ($env:BUILD_BUILDURI -like "vstfs*")
16+
{
17+
Write-Host "Installing Pester" -ForegroundColor Cyan
18+
Install-Module Pester -Force -SkipPublisherCheck
19+
}
20+
21+
if ($env:BUILD_BUILDURI -like "vstfs*")
22+
{
23+
Write-Host "Installing PSFramework" -ForegroundColor Cyan
24+
Install-Module PSFramework -Force -SkipPublisherCheck
25+
}
1726

1827
Write-Host "Importing Module" -ForegroundColor Cyan
1928

build/vsts-build.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
param (
2+
$ApiKey,
3+
$WhatIf
4+
)
5+
6+
if ($WhatIf) { Publish-Module -Path "$($env:SYSTEM_DEFAULTWORKINGDIRECTORY)\PSModuleDevelopment" -NuGetApiKey $ApiKey -Force -WhatIf }
7+
else { Publish-Module -Path "$($env:SYSTEM_DEFAULTWORKINGDIRECTORY)\PSModuleDevelopment" -NuGetApiKey $ApiKey -Force }

build/vsts-help.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
param (
2+
$Enable
3+
)
4+
5+
if (-not $Enable) { return }
6+
7+
8+
Write-Host "PowerShell Data" -ForegroundColor Green
9+
$PSVersionTable | Out-String | Write-Host
10+
11+
Write-Host ""
12+
Write-Host "Modules Available:" -ForegroundColor Green
13+
Get-Module -ListAvailable | Out-String | Write-Host
14+
15+
Write-Host ""
16+
Write-Host "Variables Available" -ForegroundColor Green
17+
Get-Variable | Out-String | Write-Host
18+
19+
Write-Host ""
20+
Write-Host "Environment Variables" -ForegroundColor Green
21+
Get-ChildItem env: | Out-String | Write-Host

build/vsts-validate.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Guide for available variables and working with secrets:
2+
# https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions/build/variables?tabs=powershell
3+
4+
# Needs to ensure things are Done Right and only legal commits to master get built

0 commit comments

Comments
 (0)