Skip to content

Commit 9ac2b62

Browse files
author
Shawn Melton
committed
updating build
1 parent 8a108e4 commit 9ac2b62

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build.ps1

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#requires -Module InvokeBuild
12
[cmdletbinding()]
23
param(
34
[Parameter(ParameterSetName = 'docs')]
@@ -34,29 +35,32 @@ $staging = "$env:TEMP\dbalight_staging\"
3435
$git = git status
3536
if ($git[1] -notmatch "Your branch is up to date" -and (-not $PSBoundParameters.ContainsKey('PublishDocs'))) {
3637
Pop-Location
37-
throw "Local branch has commits not in GitHub"
38+
throw "Local branch is dirty"
3839
}
40+
3941
if (Test-Path $staging) {
4042
Remove-Item -Recurse -Force $staging
4143
}
44+
4245
if (Get-Module dbalight) {
4346
Remove-Module dbalight -Force
4447
}
48+
4549
$imported = Import-Module "$PSScriptRoot\src\dbalight.psd1" -Force -PassThru
4650

4751
if ($PSBoundParameters['PublishDocs']) {
4852
if ($PSEdition -eq 'Desktop') {
4953
Write-Warning "Doc processing has to run under PowerShell Core"
5054
return
5155
}
52-
$docCommandPath = "$PSScriptRoot\docs\collections\_commands\"
56+
$docCommandPath = "$PSScriptRoot\docs\"
5357
Write-Host "Removing old command docs [$docCommandPath]" -ForegroundColor Black -BackgroundColor DarkCyan
5458
Remove-Item $docCommandPath -Filter *.md -Recurse -Force -Confirm:$false -ErrorAction SilentlyContinue -Verbose
5559

5660
Import-Module platyPS
5761
$cmdParams = @{
5862
Module = $moduleName
59-
CommandType = 'Function'
63+
CommandType = 'Cmdlet'
6064
}
6165
$commands = Get-Command @cmdParams
6266

0 commit comments

Comments
 (0)