Skip to content

Commit e63bba4

Browse files
update library
1 parent 60e6a5c commit e63bba4

8 files changed

Lines changed: 32 additions & 124 deletions

File tree

.github/workflows/sqlpackage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ jobs:
1616
- name: Install and cache PowerShell modules
1717
uses: potatoqualitee/psmodulecache@v5.1
1818
with:
19-
modules-to-cache: dbatools.core.library:2022.11.8
20-
modules-to-cache-prerelease: dbatools.library:2022.11.8-preview
19+
modules-to-cache: dbatools.library:2023.1.29
2120

2221
- name: Execute sqlpackage
2322
shell: pwsh

build/build-core.ps1

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ $PSDefaultParameterValues["*:Force"] = $true
22
$PSDefaultParameterValues["*:Confirm"] = $false
33

44
if (Test-Path ./lib) {
5-
write-warning removing
5+
write-warning "removing ./lib"
66
rm -rf lib
77
rm -rf temp
88
rm -rf third-party
99
rm -rf third-party-licenses
1010
}
11-
Push-Location "./project"
11+
12+
$root = Split-Path -Path $PSScriptRoot
13+
Push-Location "$root/project"
1214
dotnet publish --configuration release --framework net6.0 | Out-String -OutVariable build
1315
dotnet test --framework net6.0 --verbosity normal | Out-String -OutVariable test
1416
Pop-Location
@@ -136,14 +138,14 @@ Remove-Item -Path $xmlpdb -Recurse -ErrorAction Ignore
136138
Import-Module ./dbatools.core.library.psd1
137139

138140
<#
139-
if ((Get-ChildItem -Path C:\gallery\dbatools.core.library -ErrorAction Ignore)) {
140-
$null = Remove-Item C:\gallery\dbatools.core.library -Recurse
141-
$null = mkdir C:\gallery\dbatools.core.library
142-
$null = robocopy c:\github\dbatools.library C:\gallery\dbatools.core.library /S /XF actions-build.ps1 .markdownlint.json *.psproj* *.git* *.yml *.md dac.ps1 *build*.ps1 /XD .git .github Tests .vscode project temp runtime runtimes replication var opt | Out-String | Out-Null
143-
Remove-Item c:\gallery\dbatools.core.library\dac.ps1 -ErrorAction Ignore
144-
Remove-Item c:\gallery\dbatools.core.library\dbatools.library.psd1 -ErrorAction Ignore
145-
Copy-Item C:\github\dbatools.library\dbatools.core.library.psd1 C:\github\dbatools.core.library
146-
147-
Get-ChildItem -Recurse -Path C:\gallery\dbatools.core.library\*.ps*, C:\gallery\dbatools.core.library\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\fd0dde81152c4d4868afd88d727e78a9b6881cf4) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
141+
if ((Get-ChildItem -Path C:\gallery\dbatools.library\core -ErrorAction Ignore)) {
142+
$null = Remove-Item C:\gallery\dbatools.library\core -Recurse
143+
$null = mkdir C:\gallery\dbatools.library\core
144+
$null = robocopy c:\github\dbatools.library C:\gallery\dbatools.library\core /S /XF actions-build.ps1 .markdownlint.json *.psproj* *.git* *.yml *.md dac.ps1 *build*.ps1 /XD .git .github Tests .vscode project temp runtime runtimes replication var opt | Out-String | Out-Null
145+
Remove-Item c:\gallery\dbatools.library\core\dac.ps1 -ErrorAction Ignore
146+
Remove-Item c:\gallery\dbatools.library\core\dbatools.library.psd1 -ErrorAction Ignore
147+
#Copy-Item C:\github\dbatools.library\dbatools.core.library.psd1 C:\github\dbatools.core.library
148+
149+
Get-ChildItem -Recurse -Path C:\gallery\dbatools.library\*.ps*, C:\gallery\dbatools.library\*\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\fd0dde81152c4d4868afd88d727e78a9b6881cf4) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
148150
}
149151
#>

build/build-full.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ $PSDefaultParameterValues["*:Force"] = $true
22
$PSDefaultParameterValues["*:Confirm"] = $false
33

44
if (Test-Path "C:\github\dbatools.library\lib") {
5-
write-warning removing
5+
write-warning "removing C:\github\dbatools.library\lib"
66
Remove-Item -Path lib -Recurse -ErrorAction Ignore
77
Remove-Item -Path temp -Recurse -ErrorAction Ignore
88
Remove-Item -Path third-party -Recurse -ErrorAction Ignore
99
Remove-Item -Path third-party-licenses -Recurse -ErrorAction Ignore
1010
}
1111

12-
Push-Location ".\project"
12+
$root = Split-Path -Path $PSScriptRoot
13+
Push-Location "$root\project"
14+
1315
dotnet publish --configuration release --framework net462 | Out-String -OutVariable build
1416
dotnet test --framework net462 --verbosity normal | Out-String -OutVariable test
1517
Pop-Location

dbatools.core.library.psd1

Lines changed: 0 additions & 90 deletions
This file was deleted.

dbatools.library.psd1

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
@{
99
# Version number of this module.
10-
ModuleVersion = '2022.11.8'
10+
ModuleVersion = '2023.1.29'
1111

1212
# ID used to uniquely identify this module
1313
GUID = '00b61a37-6c36-40d8-8865-ac0180288c84'
@@ -19,20 +19,11 @@
1919
CompanyName = 'dbatools.io'
2020

2121
# Copyright statement for this module
22-
Copyright = 'Copyright (c) 2022 by dbatools, licensed under MIT'
22+
Copyright = 'Copyright (c) 2023 by dbatools, licensed under MIT'
2323

2424
# Description of the functionality provided by this module
2525
Description = "The library that powers dbatools, the community module for SQL Server Pros"
2626

27-
# Minimum version of the Windows PowerShell engine required by this module
28-
PowerShellVersion = '5.1'
29-
30-
# Minimum version of the .NET Framework required by this module
31-
DotNetFrameworkVersion = '4.6.2'
32-
33-
# Supported PSEditions
34-
CompatiblePSEditions = @('Desktop')
35-
3627
# Modules that must be imported into the global environment prior to importing this module
3728
RequiredModules = @()
3829

@@ -76,8 +67,7 @@
7667
# RequireLicenseAcceptance = ""
7768

7869
# Indicates this is a pre-release/testing version of the module.
79-
IsPrerelease = 'true'
80-
Prerelease = 'preview'
70+
IsPrerelease = 'false'
8171
}
8272
}
8373
}

dbatools.library.psm1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
function Get-DbatoolsLibraryPath {
22
[CmdletBinding()]
33
param()
4-
$PSScriptRoot
4+
if ($PSVersionTable.PSEdition -eq "Core") {
5+
Join-Path -Path $PSScriptRoot -ChildPath core
6+
} else {
7+
Join-Path -Path $PSScriptRoot -ChildPath desktop
8+
}
59
}

project/dbatools.Tests/dbatools.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
</PropertyGroup>
3535
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
3636
<ItemGroup>
37-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
38-
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
39-
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
37+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
38+
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
39+
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
4040
</ItemGroup>
4141
<ItemGroup>
4242
<ProjectReference Include="..\dbatools\dbatools.csproj" />

project/dbatools/dbatools.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@
4242
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4343
</PropertyGroup>
4444
<ItemGroup>
45+
<PackageReference Include="Microsoft.Identity.Client" Version="4.49.1" />
4546
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
4647
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
47-
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
48-
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="170.8.0" />
48+
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.0" />
49+
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="170.11.0" />
4950
<PackageReference Include="Microsoft.SqlServer.XEvent.XELite" Version="2022.11.10.6" />
5051
<PackageReference Include="Microsoft.SqlServer.DacFx" Version="161.6374.0" />
5152
</ItemGroup>

0 commit comments

Comments
 (0)