-
Notifications
You must be signed in to change notification settings - Fork 8
Start BuildScript
For those using the typical build.ps1 build scripts for PowerShell projects, this will allow invoking the build script quickly from wherever folder you are currently in using a child process.
Start-BuildScript [[-Project] <String>] [[-Task] <String[]>] [[-Engine] <String>] [-NoExit]
[-IncludeConcepts <Object>] [-GitPush <Object>] [<CommonParameters>]
For those using the typical build.ps1 build scripts for PowerShell projects, this will allow invoking the build script quickly from wherever folder you are currently in using a child process. Any projects in the ProjectPaths list that were discovered during PSProfile load and have a build.ps1 file will be able to be tab-completed for convenience. Temporarily sets the path to the build folder, invokes the build.ps1 file, then returns to the original path that it was invoked from.
Start-BuildScript MyModule -NoExit
Changes directories to the repo root of MyModule, invokes build.ps1, imports the compiled module in a clean child process and stops before exiting to allow testing of the newly compiled module.
bld MyModule -ne
Same experience as Example 1 but uses the shorter alias 'bld' to call. Also uses the parameter alias `-ne` instead of `-NoExit`
The path of the project to build. Allows tab-completion of PSBuildPath aliases if ProjectPaths are filled out with PSProfile that expand to the full path when invoked.
You can also pass the path to a folder containing a build.ps1 script, or a full path to another script entirely.
Type: String
Parameter Sets: (All)
Aliases: p
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The list of Tasks to specify to the Build script.
Type: String[]
Parameter Sets: (All)
Aliases: t
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The engine to open the clean environment with between powershell, pwsh, and pwsh-preview. Defaults to the current engine the clean environment is opened from.
Type: String
Parameter Sets: (All)
Aliases: e
Required: False
Position: 3
Default value: $(if ($PSVersionTable.PSVersion.ToString() -match 'preview') {
'pwsh-preview'
}
elseif ($PSVersionTable.PSVersion.Major -ge 6) {
'pwsh'
}
else {
'powershell'
})
Accept pipeline input: False
Accept wildcard characters: False
If $true, does not exit the child process once build.ps1 has completed and imports the built module in BuildOutput (if present to allow testing of the built project in a clean environment.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: ne, noe
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill GitPush Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill IncludeConcepts Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Command Aliases
- Configuration
- Helpers
- Init Scripts
- Meta
- Modules to Import
- Modules to Install
- Path Aliases
- Plugin Paths
- Plugins
- Power Tools
- Project Paths
- Prompts
- Script Paths
- Secrets
- Symbolic Links
- Variables
- Export-PSProfileConfiguration
- Import-PSProfile
- Import-PSProfileConfiguration
- Save-PSProfile
- Start-PSProfileConfigurationHelper
- Update-PSProfileConfig
- Update-PSProfileRefreshFrequency
- Update-PSProfileSetting
- Add-PSProfileToProfile
- Copy-Parameters
- Get-LastCommandDuration
- Get-PathAlias
- Get-PSProfileArguments
- Get-PSVersion
- Test-IfGit
- Write-PSProfileLog
- Add-PSProfileInitScript
- Disable-PSProfileInitScript
- Edit-PSProfileInitScript
- Enable-PSProfileInitScript
- Get-PSProfileInitScript
- Remove-PSProfileInitScript
- Confirm-ScriptIsValid
- Enter-CleanEnvironment
- Format-Syntax
- Get-Definition
- Get-Gist
- Get-LongPath
- Install-LatestModule
- Open-Code
- Open-Item
- Pop-Path
- Push-Path
- Start-BuildScript
- Test-RegEx
- Add-PSProfilePrompt
- Edit-PSProfilePrompt
- Get-PSProfilePrompt
- Remove-PSProfilePrompt
- Switch-PSProfilePrompt