-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpublish.ps1
More file actions
44 lines (40 loc) · 912 Bytes
/
publish.ps1
File metadata and controls
44 lines (40 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[cmdletbinding()]
Param(
[Parameter(Mandatory)]
[string]
$APIkey
)
$tags = @(
"Menu"
,
"Cli"
,
"Sub-Menu"
,
"Main-Menu"
,
"Show-Command"
,
"Console"
,
"Menus"
,
"Main"
,
"Sub"
,
"User"
,
"Menu"
)
$functionFilter = Join-Path -path . -ChildPath Functions | Join-Path -ChildPath *.ps1
$fileList = Get-ChildItem -Filter $functionFilter | where name -NotLike "*Tests*"
$ExportedFunctions = New-Object System.Collections.ArrayList
$fileList | foreach {
$null = $ExportedFunctions.Add($_.BaseName)
}
$moduleFilter = Join-Path -Path . -ChildPath *.psd1
$modulePath = Get-ChildItem -Filter $moduleFilter | Select-Object -ExpandProperty FullName
# Handled in build
#Update-ModuleManifest -Path $modulePath -Tags $tags -FunctionsToExport $ExportedFunctions
Publish-Module -NuGetApiKey $APIkey -Name $modulePath