-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathPSGallery.ps1
30 lines (23 loc) · 858 Bytes
/
PSGallery.ps1
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
[cmdletBinding()]
Param(
[Parameter(Position=0)]
[String]
$Key
)
$Manifest = Import-PowerShellDataFile $PSScriptRoot\PSSysadminToolkit.psd1
[version]$version = $Manifest.ModuleVersion
# Add one to the build of the version number
[version]$NewVersion = "{0}.{1}.{2}" -f $Version.Major, $Version.Minor, ($Version.Build + 1)
# Update the manifest file
$UpdateOptions = @{
Path = "$PSScriptRoot\PSSysadminToolkit.psd1"
ModuleVersion = $NewVersion
Tags = "Sysadmin Administration", "Toolkit"
LicenseUri = "https://github.com/steviecoaster/PSSysadminToolkit/blob/Dev/LICENSE"
}
Update-ModuleManifest @UpdateOptions
$PublishOptions = @{
Name = "$PSScriptRoot\PSSysadminToolkit.psd1"
NuGetApiKey = $Key
}
Publish-Module @PublishOptions