< Back
Get-ProjectName
Post
NAME Get-ProjectName
SYNOPSIS
Get the name for this project
SYNTAX
Get-ProjectName [[-Path] <Object>] [[-GitPath] <Object>] [<CommonParameters>]
DESCRIPTION
Get the name for this project
Evaluates based on the following scenarios:
* Subfolder with the same name as the current folder
* Subfolder with a <subfolder-name>.psd1 file in it
* Current folder with a <currentfolder-name>.psd1 file in it
+ Subfolder called "Source" or "src" (not case-sensitive) with a psd1 file in it
If no suitable project name is discovered, the function will return
the name of the root folder as the project name.
PARAMETERS
-Path <Object>
Path to project root. Defaults to the current working path
Required? false
Position? 1
Default value $PWD.Path
Accept pipeline input? false
Accept wildcard characters? false
-GitPath <Object>
Required? false
Position? 2
Default value git
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
We assume you are in the project root, for several of the fallback options
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ProjectName
RELATED LINKS
https://github.com/RamblingCookieMonster/BuildHelpers
Get-BuildVariable
Set-BuildEnvironment
about_BuildHelpers
SYNOPSIS
Get the name for this project
SYNTAX
Get-ProjectName [[-Path] <Object>] [[-GitPath] <Object>] [<CommonParameters>]
DESCRIPTION
Get the name for this project
Evaluates based on the following scenarios:
* Subfolder with the same name as the current folder
* Subfolder with a <subfolder-name>.psd1 file in it
* Current folder with a <currentfolder-name>.psd1 file in it
+ Subfolder called "Source" or "src" (not case-sensitive) with a psd1 file in it
If no suitable project name is discovered, the function will return
the name of the root folder as the project name.
PARAMETERS
-Path <Object>
Path to project root. Defaults to the current working path
Required? false
Position? 1
Default value $PWD.Path
Accept pipeline input? false
Accept wildcard characters? false
-GitPath <Object>
Required? false
Position? 2
Default value git
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
We assume you are in the project root, for several of the fallback options
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ProjectName
RELATED LINKS
https://github.com/RamblingCookieMonster/BuildHelpers
Get-BuildVariable
Set-BuildEnvironment
about_BuildHelpers