-
Notifications
You must be signed in to change notification settings - Fork 47
Invoke SamplerGit
Executes git with the provided arguments.
Invoke-SamplerGit [-Argument] <String[]> [<CommonParameters>]
This command executes git with the provided arguments and throws an error if the call failed.
Invoke-SamplerGit -Argument @('config', 'user.name', 'MyName')
Calls git to set user name in the git config.
Specifies the arguments to call git with. It is passes as an array of strings, e.g. @('tag', 'v2.0.0').
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Git does not throw an error that can be caught by the pipeline. For example this git command error but does not throw 'hello' as one would expect.
PS> try { git describe --contains } catch { throw 'hello' }
fatal: cannot describe '144e0422398e89cc8451ebba738c0a410b628302'
So we have to determine if git worked or not by checking the last exit code and then throw an error to stop the pipeline.
- Add Sample
- Convert SamplerHashtableToString
- Get BuiltModuleVersion
- Get ClassBasedResourceName
- Get CodeCoverageThreshold
- Get MofSchemaName
- Get OperatingSystemShortName
- Get PesterOutputFileFileName
- Get Psm1SchemaName
- Get SamplerAbsolutePath
- Get SamplerBuildVersion
- 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