File tree Expand file tree Collapse file tree 6 files changed +133
-11
lines changed Expand file tree Collapse file tree 6 files changed +133
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## ???
4
4
5
+ - New: Build Component - define build workflows based on pre-defined & extensible action code
5
6
- Fix: TemplateStore - default path iss invalid on MAC (#136 )
6
7
- Fix: Invoke-PSMDTemplate - unreliable string replacement through -replace operator (#113 )
7
8
- Fix: Publish-PSMDScriptFile - insufficient exclude paths (#138 ; @Callidus2000 )
Original file line number Diff line number Diff line change 1
1
function Get-PSMDBuildAction {
2
+ <#
3
+ . SYNOPSIS
4
+ Get a list of registered build actions.
5
+
6
+ . DESCRIPTION
7
+ Get a list of registered build actions.
8
+ Actions are the scriptblocks that are used to execute the build logic when running Invoke-PSMDBuildProject.
9
+
10
+ . PARAMETER Name
11
+ The name by which to filter the actions returned.
12
+ Defaults to '*'
13
+
14
+ . EXAMPLE
15
+ PS C:\> Get-PSMDBuildAction
16
+
17
+ Get a list of all registered build actions.
18
+ #>
2
19
[CmdletBinding ()]
3
20
param (
4
21
[PsfArgumentCompleter (' PSModuleDevelopment.Build.Action' )]
Original file line number Diff line number Diff line change 1
1
function Get-PSMDBuildArtifact {
2
+ <#
3
+ . SYNOPSIS
4
+ Retrieve an artifact during a build project's execution.
5
+
6
+ . DESCRIPTION
7
+ Retrieve an artifact during a build project's execution.
8
+ These artifacts are usually created during such an execution and discarded once completed.
9
+
10
+ . PARAMETER Name
11
+ The name by which to search for artifacts.
12
+ Defaults to '*'
13
+
14
+ . PARAMETER Tag
15
+ Search for artifacts by tag.
16
+ Artifacts can receive tag for better categorization.
17
+ When specifying multiple tags, any artifact containing at least one of them will be returned.
18
+
19
+ . EXAMPLE
20
+ PS C:\> Get-PSMDBuildArtifact
21
+
22
+ List all available artifacts.
23
+
24
+ . EXAMPLE
25
+ PS C:\> Get-PSMDBuildArtifact -Name ReleasePath
26
+
27
+ Returns the artifact named "ReleasePath"
28
+
29
+ . EXAMPLE
30
+ PS C:\> Get-PSMDBuildArtifact -Tag pssession
31
+
32
+ Returns all artifacts with the tag "pssession"
33
+ #>
2
34
[CmdletBinding ()]
3
35
param (
4
36
[string ]
Original file line number Diff line number Diff line change 1
1
function Get-PSMDBuildProject {
2
+ <#
3
+ . SYNOPSIS
4
+ Reads & returns a build project.
5
+
6
+ . DESCRIPTION
7
+ Reads & returns a build project.
8
+ A build project is a container including the steps executed during the build.
9
+
10
+ . PARAMETER Path
11
+ Path to the build project file.
12
+ May target the folder, in which case the -Name parameter must be specified.
13
+
14
+ . PARAMETER Name
15
+ The name of the build project to read.
16
+ Use together with the -Path parameter only.
17
+ Absolute file path assumed will be: "<Path>\<Name>.build.json"
18
+
19
+ . PARAMETER Selected
20
+ Rather than specifying the path to read from, return the currently selected build project.
21
+ Use Select-PSMDBuildProject to select a build project as the default ("selected") project.
22
+
23
+ . EXAMPLE
24
+ PS C:\> Get-PSMDBuildProject -Path 'C:\code\project' -Name project
25
+
26
+ Will load the build project stored in the file "C:\code\project\project.build.json"
27
+ #>
2
28
[CmdletBinding (DefaultParameterSetName = ' Path' )]
3
29
param (
4
30
[Parameter (Mandatory = $true , ParameterSetName = ' Path' )]
Original file line number Diff line number Diff line change 1
1
function Get-PSMDBuildStep {
2
+ <#
3
+ . SYNOPSIS
4
+ Read the steps that are part of the specified build project.
5
+
6
+ . DESCRIPTION
7
+ Read the steps that are part of the specified build project.
8
+
9
+ . PARAMETER Name
10
+ The name by which to filter the steps returned.
11
+ Defaults to '*'
12
+
13
+ . PARAMETER BuildProject
14
+ Path to the build project file to read from.
15
+ Defaults to the currently selected project if available.
16
+ Use Select-PSMDBuildProject to select a default project.
17
+
18
+ . EXAMPLE
19
+ PS C:\> Get-PSMDBuildStep
20
+
21
+ Read all steps that are part of the default build project.
22
+
23
+ . EXAMPLE
24
+ PS C:\> Get-PSMDBuildStep -Name CreateSession -BuildProject C:\code\Project\Project.build.json
25
+
26
+ Return the CreateSession step from the specified project file.
27
+ #>
2
28
[CmdletBinding ()]
3
29
param (
4
30
[string ]
Original file line number Diff line number Diff line change 1
1
function Select-PSMDBuildProject
2
2
{
3
- [CmdletBinding ()]
4
- Param (
3
+ <#
4
+ . SYNOPSIS
5
+ Set the specified build project as the default project.
5
6
6
- )
7
+ . DESCRIPTION
8
+ Set the specified build project as the default project.
9
+ This will have most other commands in this Component automatically use the specified project.
7
10
8
- begin
9
- {
11
+ . PARAMETER Path
12
+ Path to the project file to pick.
13
+
14
+ . PARAMETER Register
15
+ Persist the choice as default build project file across PowerShell sessions.
16
+
17
+ . EXAMPLE
18
+ PS C:\> Select-PSMDBuildProject -Path 'c:\code\Project\Project.build.json'
19
+
20
+ Sets the specified build project as the default project.
21
+ #>
22
+ [CmdletBinding ()]
23
+ param (
24
+ [Parameter (Mandatory = $true )]
25
+ [string ]
26
+ $Path ,
10
27
11
- }
12
- process
13
- {
28
+ [ switch ]
29
+ $Register
30
+ )
14
31
15
- }
16
- end
32
+ process
17
33
{
18
-
34
+ Invoke-PSFProtectedCommand - ActionString ' Select-PSMDBuildProject.Testing' - ActionStringValues $Path - ScriptBlock {
35
+ $null = Get-PSMDBuildProject - Path $Path - ErrorAction Stop
36
+ } - Target $Path - EnableException $true - PSCmdlet $PSCmdlet
37
+ Set-PSFConfig - Module PSModuleDevelopment - Name ' Build.Project.Selected' - Value $Path
38
+ if ($Register ) { Register-PSFConfig - Module PSModuleDevelopment - Name ' Build.Project.Selected' }
19
39
}
20
40
}
You can’t perform that action at this time.
0 commit comments