publish.ps1
Properties { $ManifestPath = Join-Path -Path $PSScriptRoot -ChildPath UncommonSense.Pushover.psd1 } Task default -Depends UpdateReadMe, Publish Task LoadBuildUtils { Import-Module UncommonSense.PowerShell.BuildUtils -Force } Task UpdateManifest -Depends LoadBuildUtils { $NewModuleVersion = Get-ModuleVersion -Path $ManifestPath | Step-ModuleVersion -By Build $ExportedFunctions = @(Get-ChildItem -Path "$PSScriptRoot\Public\*.ps1" -ErrorAction SilentlyContinue).BaseName Update-ModuleManifest ` -Path $ManifestPath ` -ModuleVersion $NewModuleVersion ` -FunctionsToExport $ExportedFunctions ` -ErrorAction Stop } Task UpdateREADME -Depends UpdateManifest { ./Update-README.ps1 -ErrorAction Stop } Task Publish -depends UpdateManifest { Publish-Module -Path $PSScriptRoot -NuGetApiKey $env:NuGetApiKey } |