diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d4920ec..97bd25a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,12 +17,12 @@ resources: type: github name: theohbrothers/PSModulePublisher endpoint: theohbrothers # Check for your 'Type: Github' connection under 'Project Settings' > 'Service connections' - ref: refs/tags/v0.3.2 + ref: refs/tags/v0.3.4 - repository: PSRepositoryReleaseManager type: github name: theohbrothers/PSRepositoryReleaseManager endpoint: theohbrothers - ref: refs/tags/v0.5.2 + ref: refs/tags/v0.6.1 stages: - stage: build_test @@ -44,22 +44,6 @@ stages: - checkout: self submodules: recursive - template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher - - job: windows_powershell_5_0 - displayName: '[Windows] PowerShell 5.0' - pool: - vmImage: vs2015-win2012r2 - steps: - - checkout: self - submodules: recursive - - template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher - - job: windows_1803 - displayName: '[Windows Server Core 1803] Windows PowerShell' - pool: - vmImage: win1803 - steps: - - checkout: self - submodules: recursive - - template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher - job: windows_2016 displayName: '[Windows Server 2016] Windows PowerShell' pool: diff --git a/build/PSModulePublisher b/build/PSModulePublisher index c91b4e7..732c5a7 160000 --- a/build/PSModulePublisher +++ b/build/PSModulePublisher @@ -1 +1 @@ -Subproject commit c91b4e794f81da08a1f6fca86dcc10891021430e +Subproject commit 732c5a72de4b38042e6f468b04cd49a924680ab5 diff --git a/build/PSRepositoryReleaseManager b/build/PSRepositoryReleaseManager index f478a7e..334d77b 160000 --- a/build/PSRepositoryReleaseManager +++ b/build/PSRepositoryReleaseManager @@ -1 +1 @@ -Subproject commit f478a7e6782741a15026c81243efbc9e8f19037c +Subproject commit 334d77b74afa8583cf8f391f19f56f1c531b601e diff --git a/src/ScheduledTaskManagement/Private/Apply-ScheduledTask.ps1 b/src/ScheduledTaskManagement/Private/Apply-ScheduledTask.ps1 index 9e241f6..c9f45c5 100644 --- a/src/ScheduledTaskManagement/Private/Apply-ScheduledTask.ps1 +++ b/src/ScheduledTaskManagement/Private/Apply-ScheduledTask.ps1 @@ -12,13 +12,13 @@ function Apply-ScheduledTask { TaskName = $DefinitionObject['TaskName'] TaskPath = $DefinitionObject['TaskPath'] Trigger = @( - $DefinitionObject['Trigger'].GetEnumerator() | % { + $DefinitionObject['Trigger'] | % { $args = $_ New-ScheduledTaskTrigger @args } ) Action = @( - $DefinitionObject['Action'].GetEnumerator() | % { + $DefinitionObject['Action'] | % { $args = $_ New-ScheduledTaskAction @args } diff --git a/src/ScheduledTaskManagement/Public/Setup-ScheduledTask.ps1 b/src/ScheduledTaskManagement/Public/Setup-ScheduledTask.ps1 index 072a422..ae705dc 100644 --- a/src/ScheduledTaskManagement/Public/Setup-ScheduledTask.ps1 +++ b/src/ScheduledTaskManagement/Public/Setup-ScheduledTask.ps1 @@ -5,16 +5,16 @@ function Setup-ScheduledTask { [ValidateScript({Test-Path $_ -PathType Leaf})] [ValidateNotNullOrEmpty()] [string[]]$DefinitionFile - , + , [Parameter(ParameterSetName='DefinitionDirectory', Mandatory=$true)] [ValidateScript({Test-Path $_ -PathType Container})] [ValidateNotNullOrEmpty()] [string[]]$DefinitionDirectory - , + , [Parameter(ParameterSetName='DefinitionObject', Mandatory=$true)] [ValidateNotNullOrEmpty()] [object[]]$DefinitionObject - , + , [Parameter(ParameterSetName='DefinitionFile', Mandatory=$false)] [Parameter(ParameterSetName='DefinitionDirectory', Mandatory=$false)] [switch]$AsJson diff --git a/test/scripts/dep/Install-TestDependencies.ps1 b/test/scripts/dep/Install-TestDependencies.ps1 index ca18b4c..c0f6b97 100644 --- a/test/scripts/dep/Install-TestDependencies.ps1 +++ b/test/scripts/dep/Install-TestDependencies.ps1 @@ -9,12 +9,13 @@ try { # Install Pester if needed "Checking Pester version" | Write-Host $pesterMinimumVersion = [version]'4.0.0' + $pesterMaximumVersion = [version]'4.10.1' $pester = Get-Module 'Pester' -ListAvailable -ErrorAction SilentlyContinue - if (!$pester -or !($pester.Version -gt $pesterMinimumVersion)) { + if (!$pester -or !($pester.Version -ge $pesterMinimumVersion) -or !($pester.Version -le $pesterMaximumVersion)) { "Installing Pester" | Write-Host - Install-Module -Name 'Pester' -Repository 'PSGallery' -MinimumVersion $pesterMinimumVersion -Scope CurrentUser -Force + Install-Module -Name 'Pester' -Repository 'PSGallery' -MinimumVersion $pesterMinimumVersion -MaximumVersion $pesterMaximumVersion -Scope CurrentUser -Force } - Get-Module Pester -ListAvailable + Get-Module Pester -ListAvailable | Out-String | Write-Verbose }catch { throw