add platyPS generated docs
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
OCram85 2022-07-14 11:17:57 +02:00
parent 10182c5263
commit 85a86bec73
25 changed files with 1497 additions and 0 deletions

58
docs/Get-RepoPath.md Normal file
View File

@ -0,0 +1,58 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Get-RepoPath
## SYNOPSIS
Updates the module manifest file fields to prepare the new build.
## SYNTAX
```
Get-RepoPath [[-SubPath] <String[]>] [<CommonParameters>]
```
## DESCRIPTION
Replaces the version fields in the manifest file.
Uses Drone env vars populated by pushed tags.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; Get-RepoPath
```
## PARAMETERS
### -SubPath
An optional string array of sub directories relative to the root.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [DroneHelper.Repo.Path] Returns a folder structured like object with relevant full paths.s
## NOTES
## RELATED LINKS

View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Install-ModuleDependency
## SYNOPSIS
Install required modules of the module manifest file.
## SYNTAX
```
Install-ModuleDependency [<CommonParameters>]
```
## DESCRIPTION
Use this cmdlet to install required modules of the module manifest file.
## EXAMPLES
### EXAMPLE 1
```
Install-ModuleDependency
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None]
## OUTPUTS
### [None]
## NOTES
## RELATED LINKS

42
docs/Invoke-BuildState.md Normal file
View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Invoke-BuildState
## SYNOPSIS
Sets final Drone pipeline build state.
## SYNTAX
```
Invoke-BuildState [<CommonParameters>]
```
## DESCRIPTION
Marks the pipeline ass succeeded of fail based on the custom state file.
## EXAMPLES
### EXAMPLE 1
```
Invoke-BuildState
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

58
docs/Invoke-FileLinter.md Normal file
View File

@ -0,0 +1,58 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Invoke-FileLinter
## SYNOPSIS
Runs the file linter for all src files found in current repository.
## SYNTAX
```
Invoke-FileLinter [-PassThru] [<CommonParameters>]
```
## DESCRIPTION
Invoke-FileLinter runs the basic file tests and generates a report file for furher usage in the
drone pipeline.
## EXAMPLES
### EXAMPLE 1
```
Invoke-FileLinter
```
## PARAMETERS
### -PassThru
{{ Fill PassThru Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None]
## OUTPUTS
### [DroneHelper.FileLinter.Report]
## NOTES
## RELATED LINKS

View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Invoke-InstallDependency
## SYNOPSIS
Install required modules for executing the DroneHelper pipeline helpers.
## SYNTAX
```
Invoke-InstallDependency [<CommonParameters>]
```
## DESCRIPTION
This can be used in drone.io docker pipeline if the modules are not integrated in the build image.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; Invoke-Install-Dependency
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No Input required.
## OUTPUTS
### [None] No Output
## NOTES
## RELATED LINKS

42
docs/Invoke-Linter.md Normal file
View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Invoke-Linter
## SYNOPSIS
Runs all PSScriptAnalyzer Rules within this repo.
## SYNTAX
```
Invoke-Linter [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used in Drone pipeline to run the PSScriptAnalyzer rules..
## EXAMPLES
### EXAMPLE 1
```
Invoke-Linter
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

42
docs/Invoke-Publish.md Normal file
View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Invoke-Publish
## SYNOPSIS
Publishes powershell module to internal Nexus repository.
## SYNTAX
```
Invoke-Publish [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used to publish the module via Drone pipeline.
## EXAMPLES
### EXAMPLE 1
```
Invoke-Publish
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

124
docs/Invoke-UnitTest.md Normal file
View File

@ -0,0 +1,124 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Invoke-UnitTest
## SYNOPSIS
Runs all Pester tests within this repo.
## SYNTAX
```
Invoke-UnitTest [[-CoverageFormat] <String>] [[-Verbosity] <String>] [-PassThru] [[-Tag] <String[]>]
[[-ExcludeTag] <String[]>] [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used in Drone pipeline to perform the Pester based unit tests.
## EXAMPLES
### EXAMPLE 1
```
Invoke-UnitTest
```
## PARAMETERS
### -CoverageFormat
Pester provides the formats JaCoCo ans CoverageGutters.
Default is JaCoCo.
These are the known use cases:
- JaCoCo -\> Used as standard coverage report used by sonar
- CoverageGutters -\> Custom Format to show coverage in VSCode.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: JaCoCo
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExcludeTag
Pester build in exclude filter for tests as string array.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PassThru
Tells Invoke-UnitTest to write back the Pester results into your variable / output.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Tag
Pester build in tag filter as string array.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Verbosity
This parameter sets the Pester detail level.
Default is 'Normal.' Available values are:
'None', 'Normal', 'Detailed', 'Diagnostic'
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Normal
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

42
docs/Merge-ModuleRoot.md Normal file
View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Merge-ModuleRoot
## SYNOPSIS
Merges single ps1 files into one module script file.
## SYNTAX
```
Merge-ModuleRoot [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used in build pipeline to reduce the file load and import performance to the target module.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; Merge-ModuleRoot
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

57
docs/New-BuildPackage.md Normal file
View File

@ -0,0 +1,57 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# New-BuildPackage
## SYNOPSIS
Creates a new module package as compressed archive.
## SYNTAX
```
New-BuildPackage [[-AdditionalPath] <String[]>] [<CommonParameters>]
```
## DESCRIPTION
This function is used in build pipeline to create an uploadable module version for the Gitea release page.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; New-BuildPackage
```
## PARAMETERS
### -AdditionalPath
You can provide additional paths to add files or folders in published module.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

44
docs/New-Docs.md Normal file
View File

@ -0,0 +1,44 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# New-Docs
## SYNOPSIS
Creates a ne set of markdown based help in the docs folder.
## SYNTAX
```
New-Docs [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet should be used once locally, or after adding new functions.
The function \`Update-Docs\`
can be used via pipeline to keep the docs up to date.
## EXAMPLES
### EXAMPLE 1
```
New-Docs
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

86
docs/Readme.md Normal file
View File

@ -0,0 +1,86 @@
---
Module Name: DroneHelper
Module Guid: 4293292f-eac8-42ed-8e9d-437d4f405d2c
Download Help Link: {{ Update Download Link }}
Help Version: {{ Please enter version of help manually (X.X.X.X) format }}
Locale: en-US
---
# DroneHelper Module
## Description
See global [Readme file](../README.md) for usage instructions.
## DroneHelper Cmdlets
### [Get-RepoPath](Get-RepoPath.md)
Updates the module manifest file fields to prepare the new build.
### [Install-ModuleDependency](Install-ModuleDependency.md)
Install required modules of the module manifest file.
### [Invoke-BuildState](Invoke-BuildState.md)
Sets final Drone pipeline build state.
### [Invoke-FileLinter](Invoke-FileLinter.md)
Runs the file linter for all src files found in current repository.
### [Invoke-InstallDependency](Invoke-InstallDependency.md)
Install required modules for executing the DroneHelper pipeline helpers.
### [Invoke-Linter](Invoke-Linter.md)
Runs all PSScriptAnalyzer Rules within this repo.
### [Invoke-Publish](Invoke-Publish.md)
Publishes powershell module to internal Nexus repository.
### [Invoke-UnitTest](Invoke-UnitTest.md)
Runs all Pester tests within this repo.
### [Merge-ModuleRoot](Merge-ModuleRoot.md)
Merges single ps1 files into one module script file.
### [New-BuildPackage](New-BuildPackage.md)
Creates a new module package as compressed archive.
### [New-Docs](New-Docs.md)
Creates a ne set of markdown based help in the docs folder.
### [Send-PRComment](Send-PRComment.md)
Sends build report as Gitea PR comment.
### [Set-EOL](Set-EOL.md)
Helper function to set the EOL sequence to LF or CRLF.
### [Test-FileBOM](Test-FileBOM.md)
Tests given file if native utf8 w/o BOM is used.
Returns false if BOM is present.
### [Test-FileEncoding](Test-FileEncoding.md)
Returns true if the given file is written in a valid encoding
### [Test-FileEOF](Test-FileEOF.md)
Returns false if EOF isn't an empty line.
### [Test-FileEOL](Test-FileEOL.md)
Returns false if EOL isn't CRLF
### [Test-FileTab](Test-FileTab.md)
Returns false if tab char is used in file.
### [Test-FileTailingWhitespace](Test-FileTailingWhitespace.md)
Returns false if there are any tailing whitespace in lines.
### [Update-Changelog](Update-Changelog.md)
Updates the changelog file with recent commits
### [Update-Docs](Update-Docs.md)
Publishes powershell module to internal Nexus repository.
### [Update-ModuleMeta](Update-ModuleMeta.md)
Updates the module manifest file fields to prepare the new build.
### [Write-FailureStateFile](Write-FailureStateFile.md)
Writes the current pipeline step into failure log.
### [Write-ResultFile](Write-ResultFile.md)
Writes the current pipeline step into failure log.

79
docs/Send-PRComment.md Normal file
View File

@ -0,0 +1,79 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Send-PRComment
## SYNOPSIS
Sends build report as Gitea PR comment.
## SYNTAX
```
Send-PRComment [[-Mode] <String>] [[-GiteaUser] <String>] [<CommonParameters>]
```
## DESCRIPTION
Send-PRComment is used to report the build details from drone.io pipeline.
## EXAMPLES
### EXAMPLE 1
```
Send-PRComment
Depends on Drone.IO injected environment vars. Doesn't work locally on dev systems.
```
## PARAMETERS
### -GiteaUser
Gitea user for drone bot
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Drone-bot
Accept pipeline input: False
Accept wildcard characters: False
```
### -Mode
Sets the report mode.
Default is 'Renew'.
This mode deletes the old pr comments and creates a new onw.
Also available:
- 'Add' -\> simply adds new pr comments.
- 'Edit' -\> Edits the last known pr comment.
Doesn't clean old ones.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Renew
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None].
## OUTPUTS
### [None]
## NOTES
## RELATED LINKS

73
docs/Set-EOL.md Normal file
View File

@ -0,0 +1,73 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Set-EOL
## SYNOPSIS
Helper function to set the EOL sequence to LF or CRLF.
## SYNTAX
```
Set-EOL [[-Style] <String>] [-Path] <FileInfo> [<CommonParameters>]
```
## DESCRIPTION
Helper for changing the EOL independent to the current OS defaults.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; Set-EOL -Path './Readme.md'
```
## PARAMETERS
### -Path
Mandatory path for target file.
```yaml
Type: FileInfo
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Style
Optional style parameter for \`unix\` or \`win.\`.
Default is \`unix\`.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Unix
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [DroneHelper.Repo.Path] Returns a folder structured like object with relevant full paths.s
## NOTES
## RELATED LINKS

58
docs/Test-FileBOM.md Normal file
View File

@ -0,0 +1,58 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Test-FileBOM
## SYNOPSIS
Tests given file if native utf8 w/o BOM is used.
Returns false if BOM is present.
## SYNTAX
```
Test-FileBOM [-Path] <String> [<CommonParameters>]
```
## DESCRIPTION
This function is used to test for a valid encoding without BOM.
## EXAMPLES
### EXAMPLE 1
```
Test-FileBOM -Path './Testfile.txt'
```
## PARAMETERS
### -Path
Full or relative path to existing file.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None]
## OUTPUTS
### [bool]
## NOTES
## RELATED LINKS

57
docs/Test-FileEOF.md Normal file
View File

@ -0,0 +1,57 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Test-FileEOF
## SYNOPSIS
Returns false if EOF isn't an empty line.
## SYNTAX
```
Test-FileEOF [-Path] <String> [<CommonParameters>]
```
## DESCRIPTION
Test the given file against the EOF standard (final empty/blank line + CRLF) and returns true or false.
## EXAMPLES
### EXAMPLE 1
```
Test-FileEOF -Path './testfile.txt'
```
## PARAMETERS
### -Path
Relative or full path to an existing file.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [none]
## OUTPUTS
### [bool]
## NOTES
## RELATED LINKS

58
docs/Test-FileEOL.md Normal file
View File

@ -0,0 +1,58 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Test-FileEOL
## SYNOPSIS
Returns false if EOL isn't CRLF
## SYNTAX
```
Test-FileEOL [-Path] <String> [<CommonParameters>]
```
## DESCRIPTION
Tests given file against valid EOL.
Returns true if CRLF is used.
## EXAMPLES
### EXAMPLE 1
```
Test-FileEOL -Path './TestFile.txt'
```
## PARAMETERS
### -Path
Relative or full path to an existing file.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None]
## OUTPUTS
### [bool]
## NOTES
## RELATED LINKS

73
docs/Test-FileEncoding.md Normal file
View File

@ -0,0 +1,73 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Test-FileEncoding
## SYNOPSIS
Returns true if the given file is written in a valid encoding
## SYNTAX
```
Test-FileEncoding [-Path] <String> [[-Encoding] <String>] [<CommonParameters>]
```
## DESCRIPTION
Test the given file against the encoding regex and returns true or false
## EXAMPLES
### EXAMPLE 1
```
Test-FileEncoding -Path './testfile.txt'
```
## PARAMETERS
### -Encoding
Optional custom encoding regex string.
Default is (utf8|ascii|xml).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: (utf8|utf-8|ascii|xml)
Accept pipeline input: False
Accept wildcard characters: False
```
### -Path
Relative or full path to an existing file.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [none]
## OUTPUTS
### [bool]
## NOTES
## RELATED LINKS

58
docs/Test-FileTab.md Normal file
View File

@ -0,0 +1,58 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Test-FileTab
## SYNOPSIS
Returns false if tab char is used in file.
## SYNTAX
```
Test-FileTab [-Path] <String> [<CommonParameters>]
```
## DESCRIPTION
Test the given file if tabs are used.
Returns false if any tabs were found.
## EXAMPLES
### EXAMPLE 1
```
Test-FileTab -Path './testfile.txt'
```
## PARAMETERS
### -Path
elative or full path to an existing file.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [none]
## OUTPUTS
### [bool]
## NOTES
## RELATED LINKS

View File

@ -0,0 +1,58 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Test-FileTailingWhitespace
## SYNOPSIS
Returns false if there are any tailing whitespace in lines.
## SYNTAX
```
Test-FileTailingWhitespace [-Path] <String> [<CommonParameters>]
```
## DESCRIPTION
Tests the given file for tailing whitespace.
Returns true if not found.
## EXAMPLES
### EXAMPLE 1
```
Test-FileTailingWhitespace.ps1 -Path './testfile.txt'
```
## PARAMETERS
### -Path
Relative or full path to an existing file.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [none]
## OUTPUTS
### [bool]
## NOTES
## RELATED LINKS

75
docs/Update-Changelog.md Normal file
View File

@ -0,0 +1,75 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Update-Changelog
## SYNOPSIS
Updates the changelog file with recent commits
## SYNTAX
```
Update-Changelog [-NewVersion] <String> [-SkipCleanup] [<CommonParameters>]
```
## DESCRIPTION
This helper function is used to insert recent changes for an upcoming release.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; Update-Changelog -NewVersion '0.0.1-dev5'
```
## PARAMETERS
### -NewVersion
Provide a valid semver based version tag for the upcoming release like:
- \`v0.0.1-dev1\`
- \`v1.0.0\`
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SkipCleanup
You can skip the tag update and additional test.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] no pipeline putput.
## NOTES
## RELATED LINKS

42
docs/Update-Docs.md Normal file
View File

@ -0,0 +1,42 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Update-Docs
## SYNOPSIS
Publishes powershell module to internal Nexus repository.
## SYNTAX
```
Update-Docs [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used to publish the module via Drone pipeline.
## EXAMPLES
### EXAMPLE 1
```
Update-Docs
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

43
docs/Update-ModuleMeta.md Normal file
View File

@ -0,0 +1,43 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Update-ModuleMeta
## SYNOPSIS
Updates the module manifest file fields to prepare the new build.
## SYNTAX
```
Update-ModuleMeta [<CommonParameters>]
```
## DESCRIPTION
Replaces the version fields in the manifest file.
Uses Drone env vars populated by pushed tags.
## EXAMPLES
### EXAMPLE 1
```
Import-Module -Name DroneHelper; Update-ModuleMeta
```
## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

View File

@ -0,0 +1,57 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Write-FailureStateFile
## SYNOPSIS
Writes the current pipeline step into failure log.
## SYNTAX
```
Write-FailureStateFile [-StepName] <String> [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used to mark single steps as failed without stopping the complete pipeline.
## EXAMPLES
### EXAMPLE 1
```
Write-FailureStateFile
```
## PARAMETERS
### -StepName
The current DroneHelper step name which should be added into to the log.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS

87
docs/Write-ResultFile.md Normal file
View File

@ -0,0 +1,87 @@
---
external help file: ModuleRoot-help.xml
Module Name: DroneHelper
online version:
schema: 2.0.0
---
# Write-ResultFile
## SYNOPSIS
Writes the current pipeline step into failure log.
## SYNTAX
```
Write-ResultFile [-InputObject] <PSObject> [-Path] <String> [-Type] <String> [<CommonParameters>]
```
## DESCRIPTION
This Cmdlet is used to mark single steps as failed without stopping the complete pipeline.
## EXAMPLES
### EXAMPLE 1
```
Write-FailureStateFile
```
## PARAMETERS
### -InputObject
{{ Fill InputObject Description }}
```yaml
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Path
{{ Fill Path Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
{{ Fill Type Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### [None] No pipeline input.
## OUTPUTS
### [None] No pipeline output.
## NOTES
## RELATED LINKS