File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ # requires -Module InvokeBuild
1
2
[cmdletbinding ()]
2
3
param (
3
4
[Parameter (ParameterSetName = ' docs' )]
@@ -34,29 +35,32 @@ $staging = "$env:TEMP\dbalight_staging\"
34
35
$git = git status
35
36
if ($git [1 ] -notmatch " Your branch is up to date" -and (-not $PSBoundParameters.ContainsKey (' PublishDocs' ))) {
36
37
Pop-Location
37
- throw " Local branch has commits not in GitHub "
38
+ throw " Local branch is dirty "
38
39
}
40
+
39
41
if (Test-Path $staging ) {
40
42
Remove-Item - Recurse - Force $staging
41
43
}
44
+
42
45
if (Get-Module dbalight) {
43
46
Remove-Module dbalight - Force
44
47
}
48
+
45
49
$imported = Import-Module " $PSScriptRoot \src\dbalight.psd1" - Force - PassThru
46
50
47
51
if ($PSBoundParameters [' PublishDocs' ]) {
48
52
if ($PSEdition -eq ' Desktop' ) {
49
53
Write-Warning " Doc processing has to run under PowerShell Core"
50
54
return
51
55
}
52
- $docCommandPath = " $PSScriptRoot \docs\collections\_commands\ "
56
+ $docCommandPath = " $PSScriptRoot \docs\"
53
57
Write-Host " Removing old command docs [$docCommandPath ]" - ForegroundColor Black - BackgroundColor DarkCyan
54
58
Remove-Item $docCommandPath - Filter * .md - Recurse - Force - Confirm:$false - ErrorAction SilentlyContinue - Verbose
55
59
56
60
Import-Module platyPS
57
61
$cmdParams = @ {
58
62
Module = $moduleName
59
- CommandType = ' Function '
63
+ CommandType = ' Cmdlet '
60
64
}
61
65
$commands = Get-Command @cmdParams
62
66
You can’t perform that action at this time.
0 commit comments