Skip to content

Commit c43ce08

Browse files
Merge pull request #59 from max-ieremenko/pwsh/7.2-plus
minimal pwsh version 7.2+
2 parents 012550f + 4872fce commit c43ce08

File tree

6 files changed

+7
-24
lines changed

6 files changed

+7
-24
lines changed

Build/show-powershell-images.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ function Get-ShortVersion {
3232
(Invoke-RestMethod -Uri 'https://mcr.microsoft.com/v2/powershell/tags/list').tags `
3333
| Where-Object { ($_ -Like '[0-9]*') -or ($_ -Like 'preview-[0-9]*') } `
3434
| Get-ShortVersion `
35+
| Where-Object { ($_ -ge '7.2') } `
3536
| Sort-Object -Unique

Build/tasks/build-tasks.ps1

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,7 @@ task PsDesktopTest {
183183
task PsCoreTest {
184184
# show-powershell-images.ps1
185185
$images = $(
186-
'mcr.microsoft.com/powershell:6.1.0-ubuntu-18.04'
187-
, 'mcr.microsoft.com/powershell:6.1.1-ubuntu-18.04'
188-
, 'mcr.microsoft.com/powershell:6.1.2-ubuntu-18.04'
189-
, 'mcr.microsoft.com/powershell:6.1.3-ubuntu-18.04'
190-
, 'mcr.microsoft.com/powershell:6.2.0-ubuntu-18.04'
191-
, 'mcr.microsoft.com/powershell:6.2.1-ubuntu-18.04'
192-
, 'mcr.microsoft.com/powershell:6.2.2-ubuntu-18.04'
193-
, 'mcr.microsoft.com/powershell:6.2.3-ubuntu-18.04'
194-
, 'mcr.microsoft.com/powershell:6.2.4-ubuntu-18.04'
195-
, 'mcr.microsoft.com/powershell:7.0.0-ubuntu-18.04'
196-
, 'mcr.microsoft.com/powershell:7.0.1-ubuntu-18.04'
197-
, 'mcr.microsoft.com/powershell:7.0.2-ubuntu-18.04'
198-
, 'mcr.microsoft.com/powershell:7.0.3-ubuntu-18.04'
199-
, 'mcr.microsoft.com/powershell:7.1.0-ubuntu-18.04'
200-
, 'mcr.microsoft.com/powershell:7.1.1-ubuntu-20.04'
201-
, 'mcr.microsoft.com/powershell:7.1.2-ubuntu-20.04'
202-
, 'mcr.microsoft.com/powershell:7.1.3-ubuntu-20.04'
203-
, 'mcr.microsoft.com/powershell:7.1.4-ubuntu-20.04'
204-
, 'mcr.microsoft.com/powershell:7.2.0-ubuntu-20.04'
186+
'mcr.microsoft.com/powershell:7.2.0-ubuntu-20.04'
205187
, 'mcr.microsoft.com/powershell:7.2.1-ubuntu-20.04'
206188
, 'mcr.microsoft.com/powershell:7.2.2-ubuntu-20.04'
207189
, 'mcr.microsoft.com/powershell:7.3-ubuntu-20.04'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Table of Contents
3939
Installation
4040
------------
4141

42-
PowerShell module is compatible with Powershell Core 6.1+ and PowerShell Desktop 5.1.
42+
PowerShell module is compatible with Powershell Core 7.2+ and PowerShell Desktop 5.1.
4343

4444
.net tool is compatible with .net sdk 8.0 and 6.0.
4545

Sources/SqlDatabase.Package/choco/sqldatabase.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1717
<summary>Command-line tool and PowerShell module for SQL Server.</summary>
1818
<description>SqlDatabase is a tool for SQL Server, allows to execute scripts, database migrations and export data.
19-
Requires Powershell Core 6.1+ or PowerShell Desktop 5.1.</description>
19+
Requires Powershell Core 7.2+ or PowerShell Desktop 5.1.</description>
2020
<releaseNotes>https://github.com/max-ieremenko/SqlDatabase/releases</releaseNotes>
2121
<copyright>(C) 2018-2022 Max Ieremenko.</copyright>
2222
<tags>sqlserver sqlcmd migration-tool c-sharp command-line-tool migration-step sql-script sql-database database-migrations export-data</tags>
280 Bytes
Binary file not shown.

Sources/SqlDatabase.PowerShell/SqlDatabase.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Set-StrictMode -Version Latest
22

3-
if (($PSVersionTable.Keys -contains "PSEdition") -and ($PSVersionTable.PSEdition -ne 'Desktop') -and ([version]$PSVersionTable.PSVersion -lt "6.1.0")) {
4-
Write-Error "This module requires PowerShell 6.1.0+. Please, upgrade your PowerShell version."
3+
if (($PSVersionTable.Keys -contains 'PSEdition') -and ($PSVersionTable.PSEdition -ne 'Desktop') -and ([version]$PSVersionTable.PSVersion -lt '7.2.0')) {
4+
Write-Error 'This module requires PowerShell 7.2+. Please, upgrade your PowerShell version.'
55
Exit 1
66
}
77

88
$psModule = $ExecutionContext.SessionState.Module
99
$root = $psModule.ModuleBase
10-
$dllPath = Join-Path -Path $root "SqlDatabase.PowerShell.dll"
10+
$dllPath = Join-Path -Path $root 'SqlDatabase.PowerShell.dll'
1111

1212
$importedModule = Import-Module -Name $dllPath -PassThru
1313

0 commit comments

Comments
 (0)