Skip to content

Commit

Permalink
Merge pull request #773 from d365collaborative/development
Browse files Browse the repository at this point in the history
Merge: 0.7.4
  • Loading branch information
Splaxi authored Oct 24, 2023
2 parents 6569e69 + cd8ac78 commit 1e1095d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion d365fo.tools/d365fo.tools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RootModule = 'd365fo.tools.psm1'

# Version number of this module.
ModuleVersion = '0.7.3'
ModuleVersion = '0.7.4'

# ID used to uniquely identify this module
GUID = '7c7b26d4-f764-4cb0-a692-459a0a689dbb'
Expand Down
2 changes: 1 addition & 1 deletion d365fo.tools/d365fo.tools.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$script:ModuleRoot = $PSScriptRoot
$script:ModuleVersion = "0.7.3"
$script:ModuleVersion = "0.7.4"

# Detect whether at some level dotsourcing was enforced
$script:doDotSource = Get-PSFConfigValue -FullName d365fo.tools.Import.DoDotSource -Fallback $false
Expand Down
4 changes: 2 additions & 2 deletions d365fo.tools/functions/invoke-d365installsqlpackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ function Invoke-D365InstallSqlPackage {
)

if (-not $SkipExtractFromPage) {
$content = (Invoke-WebRequest -Uri "https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download" -UseBasicParsing).content
$content = (Invoke-WebRequest -Uri "https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download" -UseBasicParsing).content
$res = $content -match '<td.*>Windows .NET Core<.*/td>\s*<td.*><a href="(https://.*)" .*'

if ($res) {
$Url = ([string]$Matches[1]).Trim()
}
else {
Write-PSFMessage -Level Host -Message "Parsing the web page didn't succeed. Will fall back to the download url." -Target "https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download"
Write-PSFMessage -Level Host -Message "Parsing the web page didn't succeed. Will fall back to the download url." -Target "https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download"
}
}

Expand Down
7 changes: 5 additions & 2 deletions d365fo.tools/internal/functions/get-azureserviceobjective.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ function Get-AzureServiceObjective {

[switch] $EnableException
)

$sqlCommand = Get-SqlCommand @PsBoundParameters -TrustedConnection $false

$Params = Get-DeepClone $PSBoundParameters
if($Params.ContainsKey("EnableException")){$null = $Params.Remove("EnableException")}

$sqlCommand = Get-SqlCommand @Params -TrustedConnection $false

$commandText = (Get-Content "$script:ModuleRoot\internal\sql\get-azureserviceobjective.sql") -join [Environment]::NewLine

Expand Down
5 changes: 4 additions & 1 deletion d365fo.tools/internal/functions/get-instancevalues.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ function Get-InstanceValues {
[switch] $EnableException
)

$sqlCommand = Get-SqlCommand @PsBoundParameters
$Params = Get-DeepClone $PSBoundParameters
if($Params.ContainsKey("EnableException")){$null = $Params.Remove("EnableException")}

$sqlCommand = Get-SqlCommand @Params

$commandText = (Get-Content "$script:ModuleRoot\internal\sql\get-instancevalues.sql") -join [Environment]::NewLine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ Function Invoke-ClearAzureSpecificObjects {
[switch] $EnableException
)

$sqlCommand = Get-SQLCommand @PsBoundParameters -TrustedConnection $false
$Params = Get-DeepClone $PSBoundParameters
if($Params.ContainsKey("EnableException")){$null = $Params.Remove("EnableException")}

$sqlCommand = Get-SqlCommand @Params -TrustedConnection $false

$commandText = (Get-Content "$script:ModuleRoot\internal\sql\clear-azurebacpacdatabase.sql") -join [Environment]::NewLine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ Function Invoke-ClearSqlSpecificObjects {
[switch] $EnableException
)

$sqlCommand = Get-SQLCommand @PsBoundParameters
$Params = Get-DeepClone $PSBoundParameters
if($Params.ContainsKey("EnableException")){$null = $Params.Remove("EnableException")}

$sqlCommand = Get-SqlCommand @Params

$commandText = (Get-Content "$script:ModuleRoot\internal\sql\clear-sqlbacpacdatabase.sql") -join [Environment]::NewLine

Expand Down

0 comments on commit 1e1095d

Please sign in to comment.