Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] development from d365collaborative:development #70

Merged
merged 6 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading