Skip to content

Commit d106bbd

Browse files
Merge branch 'development' into createObjects
2 parents ba0a0d4 + 13a1989 commit d106bbd

14 files changed

+628
-233
lines changed

PSModuleDevelopment/PSModuleDevelopment.psd1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'PSModuleDevelopment.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '2.2.10.128'
7+
ModuleVersion = '2.2.10.134'
88

99
# ID used to uniquely identify this module
1010
GUID = '37dd5fce-e7b5-4d57-ac37-832055ce49d6'
@@ -27,7 +27,7 @@
2727
# Modules that must be imported into the global environment prior to importing
2828
# this module
2929
RequiredModules = @(
30-
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.6.205' }
30+
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.6.214' }
3131
@{ ModuleName = 'string'; ModuleVersion = '1.0.0' }
3232
)
3333

@@ -102,6 +102,7 @@
102102
'Set-PSMDStagingRepository'
103103
'Show-PSMDSyntax'
104104
'Split-PSMDScriptFile'
105+
'Test-PSMDClmCompatibility'
105106
)
106107

107108
# Cmdlets to export from this module
@@ -115,6 +116,7 @@
115116
'build'
116117
'dotnetnew'
117118
'find'
119+
'ftype'
118120
'hex'
119121
'imt'
120122
'ipmod'

PSModuleDevelopment/changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 2.2.10.134 (2022-03-17)
4+
5+
+ New: Test-PSMDClmCompatibility - Tests, whether the targeted file would have trouble executing under Constrained Language Mode.
6+
+ New: alias ftype --> Find-PSMDType
7+
+ Upd: Action: connect-pssession - added Credential parameter
8+
+ Upd: Get-PsmdBuildAction - improved output format
9+
+ Upd: Get-PsmdBuildProject - added support for psd1 documents
10+
+ Fix: New-PSMDBuildProject - Would register relative paths for the current project
11+
312
## 2.2.10.128 (2021-11-11)
413

514
+ New: Action: deployModule - Deploys a module to the target computer(s)

PSModuleDevelopment/functions/assembly/Find-PSMDType.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
5656
Finds all types that inherit from the Runspace class
5757
#>
58+
[Alias('ftype')]
5859
[CmdletBinding()]
5960
Param (
6061
[string]
@@ -127,4 +128,4 @@
127128
}
128129
}
129130
}
130-
}
131+
}

PSModuleDevelopment/functions/build/Get-PSMDBuildProject.ps1

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,21 @@
4242
)
4343

4444
process {
45-
#region By Path
4645
if ($Path) {
4746
$importPath = $Path
4847
if ($Name) { $importPath = Join-Path -Path $Path -ChildPath "$Name.build.json" }
49-
50-
Get-Content -Path $importPath -Encoding UTF8 | ConvertFrom-Json
48+
if (-not (Test-Path -Path $importPath)) {
49+
$importPath = Join-Path -Path $Path -ChildPath "$Name.build.psd1"
50+
}
5151
}
52-
#endregion By Path
53-
54-
#region Selected
5552
else {
56-
Get-Content -Path (Get-PSFConfigValue -FullName 'PSModuleDevelopment.Build.Project.Selected') -Encoding UTF8 | ConvertFrom-Json
53+
$importPath = Get-PSFConfigValue -FullName 'PSModuleDevelopment.Build.Project.Selected'
54+
}
55+
56+
if (-not (Test-Path -Path $importPath)) {
57+
throw "Path not found: $importPath"
5758
}
58-
#endregion Selected
59+
if ($importPath -like "*.psd1") { Import-PSFPowerShellDataFile -Path $importPath }
60+
else { Get-Content -Path $importPath -Encoding UTF8 | ConvertFrom-Json }
5961
}
6062
}

PSModuleDevelopment/functions/build/Invoke-PSMDBuildProject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
}
119119
process {
120120
$projectObject = Get-PSMDBuildProject -Path $projectPath
121-
$steps = $projectObject.Steps | Sort-Object Weight
121+
$steps = $projectObject.Steps | Sort-Object { $_.Weight } # Might be a hashtable
122122

123123
$count = 0
124124
$stepResults = :main foreach ($step in $steps) {

PSModuleDevelopment/functions/build/New-PSMDBuildProject.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@
7878
)
7979

8080
process {
81+
$resolvedPath = Resolve-PSFPath -Path $Path
8182
$project = [pscustomobject]@{
8283
Name = $Name
8384
Condition = $Condition
8485
ConditionSet = $ConditionSet
8586
Steps = @()
8687
}
87-
$outPath = Join-Path -Path $Path -ChildPath "$Name.build.Json"
88+
$outPath = Join-Path -Path $resolvedPath -ChildPath "$Name.build.Json"
8889
$project | Export-PsmdBuildProjectFile -OutPath $outPath -ErrorAction Stop
8990
if (-not $NoSelect) {
9091
Set-PSFConfig -Module PSModuleDevelopment -Name 'Build.Project.Selected' -Value $outPath

PSModuleDevelopment/functions/build/Resolve-PSMDBuildStepParameter.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
- Value from implicit artifact resolution: Any value that is formatted like this:
1414
"%!NameOfArtifact!%" will be replaced with the value of the artifact of the same name.
1515
This supports wildcard resolution, so "%!Session.*!%" will resolve to all artifacts with a name starting with "Session."
16+
17+
Configuration-driven parameters follow this name scheme:
18+
"PSModuleDevelopment.BuildParam.<project>.<step>.<parameterName>"
19+
20+
For example:
21+
"PSModuleDevelopment.BuildParam.Admf.connect.credential"
1622
1723
.PARAMETER Parameters
1824
The hashtable containing the currently specified parameters from the step configuration within the build project file.

0 commit comments

Comments
 (0)