-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(SQL2014.ClrTypes) Switch to AU package [AU:SQL2014.ClrTypes]
- Loading branch information
Showing
6 changed files
with
85 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# <img src="" width="48" height="48"/> [SQL2014.ClrTypes](https://chocolatey.org/packages/SQL2014.ClrTypes) | ||
|
||
The SQL Server System CLR Types package contains the components implementing the new geometry, geography, and hierarchyid types in SQL Server 2014. This component can be installed separately from the server to allow client applications to use these types outside of the server. | ||
|
||
**Please Note**: This is an automatically updated package. If you find it is | ||
out of date by more than a day or two, please contact the maintainer(s) and | ||
let them know the package is no longer updating correctly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
29 changes: 18 additions & 11 deletions
29
...2014.ClrTypes/tools/chocolateyInstall.ps1 → ...2014.ClrTypes/tools/chocolateyInstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Import-Module AU | ||
Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" | ||
Import-Module "$PSScriptRoot\..\..\scripts/au_extensions.psm1" | ||
|
||
function global:au_SearchReplace { | ||
@{ | ||
'.\tools\chocolateyInstall.ps1' = @{ | ||
"(^[$]url32\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" | ||
"(^[$]checksum32\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" | ||
"(^[$]checksumType32\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'" | ||
"(^[$]url64\s*=\s*)('.*')" = "`$1'$($Latest.URL64)'" | ||
"(^[$]checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'" | ||
"(^[$]checksumType64\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType64)'" | ||
} | ||
} | ||
} | ||
|
||
function GetResultInformation([string]$url32, [string]$url64) { | ||
$dest = "$env:TEMP\SQLSysClrTypes.msi" | ||
|
||
Get-WebFile $url32 $dest | Out-Null | ||
$checksumType = 'sha256' | ||
$version = (Get-MsiInformation -Path $dest).ProductVersion | ||
$checksum32 = Get-FileHash $dest -Algorithm $checksumType | % Hash | ||
Remove-Item -force $dest -ErrorAction SilentlyContinue | ||
|
||
return @{ | ||
URL32 = $url32 | ||
URL64 = $url64 | ||
Version = $version | ||
Checksum32 = $checksum32 | ||
ChecksumType32 = $checksumType | ||
Checksum64 = Get-RemoteChecksum $url64 -Algorithm $checksumType | ||
ChecksumType64 = $checksumType | ||
} | ||
} | ||
|
||
function global:au_GetLatest { | ||
$url32 = 'https://download.microsoft.com/download/F/E/E/FEE62C90-E5A9-4746-8478-11980609E5C2/ENU/x86/SQLSysClrTypes.msi' | ||
$url64 = 'https://download.microsoft.com/download/F/E/E/FEE62C90-E5A9-4746-8478-11980609E5C2/ENU/x64/SQLSysClrTypes.msi' | ||
|
||
Update-OnETagChanged -execUrl $url64 ` | ||
-OnETagChanged { | ||
GetResultInformation $url32 $url64 | ||
} -OnUpdated { @{ URL32 = $url32 ; URL64 = $url64 }} | ||
} | ||
|
||
update -ChecksumFor none |