Skip to content

Commit c3b91b3

Browse files
authored
Merge pull request #176 from fscpscollaborative/develop
Release merge
2 parents 04d9397 + 09ef3d5 commit c3b91b3

3 files changed

Lines changed: 10 additions & 28 deletions

File tree

fscps.tools/fscps.tools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PowerShellVersion = '5.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'PSFramework'; ModuleVersion = '1.12.346'; },
54+
RequiredModules = @(@{ModuleName = 'PSFramework'; ModuleVersion = '1.13.406'; },
5555
@{ModuleName = 'Az.Storage'; ModuleVersion = '1.11.0'; },
5656
@{ModuleName = 'd365fo.tools'; ModuleVersion = '0.7.22'; },
5757
@{ModuleName = 'Invoke-MsBuild'; ModuleVersion = '2.7.1'; },

fscps.tools/fscps.tools.psm1

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,30 @@ function Import-ModuleFile
2424
<#
2525
.SYNOPSIS
2626
Loads files into the module on module import.
27-
27+
2828
.DESCRIPTION
2929
This helper function is used during module initialization.
3030
It should always be dotsourced itself, in order to proper function.
31-
31+
3232
This provides a central location to react to files being imported, if later desired
33-
33+
3434
.PARAMETER Path
3535
The path to the file to load
36-
36+
3737
.EXAMPLE
3838
PS C:\> . Import-ModuleFile -File $function.FullName
39-
39+
4040
Imports the file stored in $function according to import policy
4141
#>
4242
[CmdletBinding()]
4343
Param (
4444
[string]
4545
$Path
4646
)
47+
48+
if ($doDotSource) { . (Resolve-Path $Path) }
4749

48-
try {
49-
$resolvedPath = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($Path).ProviderPath
50-
if ($script:doDotSource) {
51-
. $resolvedPath
52-
}
53-
else {
54-
$content = [io.file]::ReadAllText($resolvedPath)
55-
if (-not [string]::IsNullOrWhiteSpace($content)) {
56-
$scriptBlock = [scriptblock]::Create($content)
57-
if ($scriptBlock) {
58-
$ExecutionContext.InvokeCommand.InvokeScript($false, $scriptBlock, $null, $null)
59-
}
60-
}
61-
}
62-
}
63-
catch {
64-
Write-Warning "Failed to import module file '$Path': $($_.Exception.Message)"
65-
}
50+
else { $ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create([io.file]::ReadAllText((Resolve-Path $Path)))), $null, $null) }
6651
}
6752

6853

fscps.tools/functions/get-fscpsmodelversion.ps1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,4 @@ function Get-FSCPSModelVersion {
135135
end{
136136
Invoke-TimeSignal -End
137137
}
138-
}
139-
140-
$curModelVersion = Get-FSCPSModelVersion -ModelPath "D:\Sources\vertex\connector-d365-unified-connector\PackagesLocalDirectory\Vertex"
141-
$curModelVersion.Version
138+
}

0 commit comments

Comments
 (0)