-
Notifications
You must be signed in to change notification settings - Fork 42
Get SamplerBuiltModuleBase
Get the ModuleBase of a module built with Sampler (directory where the module manifest is).
Get-SamplerBuiltModuleBase [-OutputDirectory] <String> [[-BuiltModuleSubdirectory] <String>]
[-ModuleName] <String> [-VersionedOutputDirectory] [[-ModuleVersion] <String>]
[<CommonParameters>]
Based on a project's configuration of OutputDirectory, BuiltModuleSubdirectory, ModuleName and whether the built module is within a VersionedOutputDirectory; this function will resolve the expected ModuleBase of that Module.
Get-SamplerBuiltModuleBase -OutputDirectory C:\src\output -BuiltModuleSubdirectory 'Module' -ModuleName 'stuff' -ModuleVersion 3.1.2-preview001
# C:\src\output\Module\stuff\3.1.2
Sub folder where you want to build the Module to (instead of $OutputDirectory/$ModuleName).
This is especially useful when you want to build DSC Resources, but you don't want the
Get-DscResource
command to find several instances of the same DSC Resources because
of the overlapping $Env:PSmodulePath ($buildRoot/output
for the built module and $buildRoot/output/RequiredModules
).
In most cases I would recommend against setting $BuiltModuleSubdirectory.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Name of the Module to retrieve the version from its manifest (See Get-SamplerProjectName).
Type: String
Parameter Sets: (All)
Aliases: ProjectName
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Allows to specify a specific ModuleVersion to search the ModuleBase if known. If the ModuleVersion is not known but the VersionedOutputDirectory is set to $true, a wildcard (*) will be used so that the path can be resolved by Get-Item or similar commands.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: *
Accept pipeline input: False
Accept wildcard characters: False
Output directory (usually as defined by the Project). By default it is set to 'output' in a Sampler project.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Whether the Module is built with its versioned Subdirectory, as you would see it on a System.
For instance, if VersionedOutputDirectory is $true, the built module's ModuleBase would be: output/MyModuleName/2.0.1/
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.
- Add-Sample
- Convert-SamplerHashtableToString
- Get-BuildVersion
- Get-BuiltModuleVersion
- Get-ClassBasedResourceName
- Get-CodeCoverageThreshold
- Get-MofSchemaName
- Get-OperatingSystemShortName
- Get-PesterOutputFileFileName
- Get-Psm1SchemaName
- Get-SamplerAbsolutePath
- Get-SamplerBuiltModuleBase
- Get-SamplerBuiltModuleManifest
- Get-SamplerCodeCoverageOutputFile
- Get-SamplerCodeCoverageOutputFileEncoding
- Get-SamplerModuleInfo
- Get-SamplerModuleRootPath
- Get-SamplerProjectName
- Get-SamplerSourcePath
- Invoke-SamplerGit
- Merge-JaCoCoReport
- New-SampleModule
- New-SamplerJaCoCoDocument
- New-SamplerPipeline
- Out-SamplerXml
- Set-SamplerPSModulePath
- Split-ModuleVersion
- Update-JaCoCoStatistic