diff --git a/PSGSuite/PSGSuite.psd1 b/PSGSuite/PSGSuite.psd1 index 865b7a2b..f6e1f733 100644 --- a/PSGSuite/PSGSuite.psd1 +++ b/PSGSuite/PSGSuite.psd1 @@ -30,7 +30,7 @@ Description = "PSGSuite is a Powershell module wrapping Google's .NET SDKs in handy functions, enabling users perform tasks as large as G Suite SuperAdmins automating the administration of their multi-domain G Suite accounts down to free, Google account users sending Gmail messages or uploading content to Drive from home." # Minimum version of the Windows PowerShell engine required by this module - PowerShellVersion = '4.0' + PowerShellVersion = '5.1' # Name of the Windows PowerShell host required by this module # PowerShellHostName = '' diff --git a/psake.ps1 b/psake.ps1 index 2a72986b..ae531bf7 100644 --- a/psake.ps1 +++ b/psake.ps1 @@ -532,7 +532,7 @@ $deployScriptBlock = { # Bump the module version if ($versionToDeploy) { try { - if ($ENV:BHBuildSystem -eq 'VSTS' -and -not [String]::IsNullOrEmpty($env:NugetApiKey)) { + if ([String]::IsNullOrEmpty($env:NugetApiKey)) { " Publishing version [$($versionToDeploy)] to PSGallery..." Update-Metadata -Path (Join-Path $outputModVerDir "$($env:BHProjectName).psd1") -PropertyName ModuleVersion -Value $versionToDeploy Publish-Module -Path $outputModVerDir -NuGetApiKey $env:NugetApiKey -Repository PSGallery @@ -542,24 +542,24 @@ $deployScriptBlock = { " [SKIPPED] Deployment of version [$($versionToDeploy)] to PSGallery" } $commitId = git rev-parse --verify HEAD - if ($ENV:BHBuildSystem -eq 'VSTS' -and -not [String]::IsNullOrEmpty($env:TwitterAccessSecret) -and -not [String]::IsNullOrEmpty($env:TwitterAccessToken) -and -not [String]::IsNullOrEmpty($env:TwitterConsumerKey) -and -not [String]::IsNullOrEmpty($env:TwitterConsumerSecret)) { - " Publishing tweet about new release..." - $manifest = Import-PowerShellDataFile -Path (Join-Path $outputModVerDir "$($env:BHProjectName).psd1") - $text = "#$($env:BHProjectName) v$($versionToDeploy) is now available on the #PSGallery! https://www.powershellgallery.com/packages/$($env:BHProjectName)/$($versionToDeploy) #PowerShell" - $manifest.PrivateData.PSData.Tags | Foreach-Object { - $text += " #$($_)" - } - if ($text.Length -gt 280) { - " Trimming [$($text.Length - 280)] extra characters from tweet text to get to 280 character limit..." - $text = $text.Substring(0,280) - } - " Tweet text: $text" - Publish-Tweet -Tweet $text -ConsumerKey $env:TwitterConsumerKey -ConsumerSecret $env:TwitterConsumerSecret -AccessToken $env:TwitterAccessToken -AccessSecret $env:TwitterAccessSecret - " Tweet successful!" - } - else { - " [SKIPPED] Twitter update of new release" - } + # if ($ENV:BHBuildSystem -eq 'VSTS' -and -not [String]::IsNullOrEmpty($env:TwitterAccessSecret) -and -not [String]::IsNullOrEmpty($env:TwitterAccessToken) -and -not [String]::IsNullOrEmpty($env:TwitterConsumerKey) -and -not [String]::IsNullOrEmpty($env:TwitterConsumerSecret)) { + # " Publishing tweet about new release..." + # $manifest = Import-PowerShellDataFile -Path (Join-Path $outputModVerDir "$($env:BHProjectName).psd1") + # $text = "#$($env:BHProjectName) v$($versionToDeploy) is now available on the #PSGallery! https://www.powershellgallery.com/packages/$($env:BHProjectName)/$($versionToDeploy) #PowerShell" + # $manifest.PrivateData.PSData.Tags | Foreach-Object { + # $text += " #$($_)" + # } + # if ($text.Length -gt 280) { + # " Trimming [$($text.Length - 280)] extra characters from tweet text to get to 280 character limit..." + # $text = $text.Substring(0,280) + # } + # " Tweet text: $text" + # Publish-Tweet -Tweet $text -ConsumerKey $env:TwitterConsumerKey -ConsumerSecret $env:TwitterConsumerSecret -AccessToken $env:TwitterAccessToken -AccessSecret $env:TwitterAccessSecret + # " Tweet successful!" + # } + # else { + # " [SKIPPED] Twitter update of new release" + # } if (-not [String]::IsNullOrEmpty($env:GitHubPAT)) { " Creating Release ZIP..." $zipPath = [System.IO.Path]::Combine($PSScriptRoot,"$($env:BHProjectName).zip")