1- task Default Initialize, Clean , Build, Pack, UnitTest, InitializeIntegrationTest, IntegrationTest
1+ task Default Initialize, Clean , Build, ThirdPartyNotices , Pack, UnitTest, InitializeIntegrationTest, IntegrationTest
22task Pack PackGlobalTool, PackPoweShellModule, PackNuget452, PackManualDownload
33
44. .\build-scripts.ps1
55
66task Initialize {
7- $sources = Join-Path $PSScriptRoot " ..\Sources"
7+ $sources = [ System.IO.Path ]::GetFullPath(( Join-Path $PSScriptRoot " ..\Sources" ))
88 $bin = [System.IO.Path ]::GetFullPath((Join-Path $PSScriptRoot " ..\bin" ))
99 $artifacts = Join-Path $bin " artifacts"
1010
@@ -37,6 +37,10 @@ task Build {
3737 exec { dotnet build $solutionFile - t:Rebuild - p:Configuration= Release }
3838}
3939
40+ task ThirdPartyNotices {
41+ Invoke-Build - File build-tasks .third- party.ps1 - Task " ThirdParty" - settings $settings
42+ }
43+
4044task PackGlobalTool {
4145 $projectFile = Join-Path $settings.sources " SqlDatabase\SqlDatabase.csproj"
4246
@@ -62,8 +66,13 @@ task PackPoweShellModule {
6266 $psdFile = Join-Path $dest " SqlDatabase.psd1"
6367 ((Get-Content - Path $psdFile - Raw) -replace ' {{ModuleVersion}}' , $settings.version ) | Set-Content - Path $psdFile
6468
65- # copy to powershell
69+ # copy license
6670 Copy-Item - Path (Join-Path $settings.sources " ..\LICENSE.md" ) - Destination $dest
71+
72+ # copy ThirdPartyNotices
73+ Copy-Item - Path (Join-Path $settings.bin " ThirdPartyNotices.txt" ) - Destination $dest
74+
75+ # copy net452
6776 $net45Dest = Join-Path $dest " net452"
6877 $net45Source = Join-Path $settings.bin " SqlDatabase\net452"
6978 New-Item - Path $net45Dest - ItemType Directory | Out-Null
@@ -94,11 +103,12 @@ task PackNuget452 PackPoweShellModule, {
94103task PackManualDownload PackGlobalTool, PackPoweShellModule, {
95104 $out = $settings.artifacts
96105 $lic = Join-Path $settings.sources " ..\LICENSE.md"
106+ $thirdParty = Join-Path $settings.bin " ThirdPartyNotices.txt"
97107 $packageVersion = $settings.version
98-
108+
99109 $destination = Join-Path $out " SqlDatabase.$packageVersion -net452.zip"
100110 $source = Join-Path $settings.bin " SqlDatabase\net452\*"
101- Compress-Archive - Path $source , $lic - DestinationPath $destination
111+ Compress-Archive - Path $source , $lic , $thirdParty - DestinationPath $destination
102112
103113 $destination = Join-Path $out " SqlDatabase.$packageVersion -PowerShell.zip"
104114 $source = Join-Path $settings.artifactsPowerShell " *"
@@ -108,15 +118,15 @@ task PackManualDownload PackGlobalTool, PackPoweShellModule, {
108118 $exe = Join-Path $settings.bin " SqlDatabase\netcoreapp3.1\publish\SqlDatabase.exe"
109119 $destination = Join-Path $out " SqlDatabase.$packageVersion -netcore22.zip"
110120 $source = Join-Path $settings.bin " SqlDatabase\netcoreapp2.2\publish\*"
111- Compress-Archive - Path $source , $exe , $lic - DestinationPath $destination
121+ Compress-Archive - Path $source , $exe , $lic , $thirdParty - DestinationPath $destination
112122
113123 $destination = Join-Path $out " SqlDatabase.$packageVersion -netcore31.zip"
114124 $source = Join-Path $settings.bin " SqlDatabase\netcoreapp3.1\publish\*"
115- Compress-Archive - Path $source , $lic - DestinationPath $destination
125+ Compress-Archive - Path $source , $lic , $thirdParty - DestinationPath $destination
116126
117127 $destination = Join-Path $out " SqlDatabase.$packageVersion -net50.zip"
118128 $source = Join-Path $settings.bin " SqlDatabase\net5.0\publish\*"
119- Compress-Archive - Path $source , $lic - DestinationPath $destination
129+ Compress-Archive - Path $source , $lic , $thirdParty - DestinationPath $destination
120130}
121131
122132task UnitTest {
@@ -165,6 +175,7 @@ task IntegrationTest {
165175 @ { File = " build-tasks.it-ps-core.ps1" ; Task = " Test" ; settings = $settings ; image = " mcr.microsoft.com/powershell:7.1.0-ubuntu-18.04" }
166176 @ { File = " build-tasks.it-ps-core.ps1" ; Task = " Test" ; settings = $settings ; image = " mcr.microsoft.com/powershell:7.1.2-ubuntu-20.04" }
167177 @ { File = " build-tasks.it-ps-core.ps1" ; Task = " Test" ; settings = $settings ; image = " mcr.microsoft.com/powershell:7.2.0-preview.2-ubuntu-20.04" }
178+ @ { File = " build-tasks.it-ps-core.ps1" ; Task = " Test" ; settings = $settings ; image = " mcr.microsoft.com/powershell:7.2.0-preview.4-ubuntu-20.04" }
168179
169180 @ { File = " build-tasks.it-tool-linux.ps1" ; Task = " Test" ; settings = $settings ; image = " sqldatabase/dotnet_pwsh:2.2-sdk" }
170181 @ { File = " build-tasks.it-tool-linux.ps1" ; Task = " Test" ; settings = $settings ; image = " sqldatabase/dotnet_pwsh:3.1-sdk" }
0 commit comments