This repo contains Plaster templates for quickly creating PowerShell projects and items.
In order to use this project you need the following:
The following steps will clone the repo, install all dependencies and execute a build and all unit tests.
git clone [email protected]:rlvandaveer/HeliarPlasterTemplates.git
cd Heliar-Plaster-Templates
Install-Module -Name psake
Invoke-psake ./build/tasks.ps1 -taskList Test
git clone [email protected]:rlvandaveer/HeliarPlasterTemplates.git
Invoke-psake ./build/tasks.ps1 -taskList Test
Invoke-psake ./build/tasks.ps1 -taskList Publish
For more see the build readme
This project depends on the following modules/applications to manage dependencies, build, test, version, and publish, and will install them if they are not present when executed:
- /build - contains the code for destributing the templates contained in the project
- /cicd - contains continuous integration-continuous delivery code
- /docs - contains documentation for using and maintaining the Heliar Plaster Templates project
- /dist - created automatically when a build is executed. Contains everything needed to distribute the PowerShell module.
- /source - contains the source code for each template
- /tests - contains unit tests for the Heliar Plaster Templates PowerShell module
- NewPowerShellModuleProject - this template will create a project with configuration options for building, publishing, testing, and versioning a PowerShell module.
Install-Module -Name HeliarPlasterTemplates
Once the module has been installed, you should be able to see all of the installed templates by using the following command:
Get-PlasterTemplates -IncludeInstalledModules
Which will give output similar to:
Title : AddPSScriptAnalyzerSettings
Author : Plaster project
Version : 1.0.0
Description : Add a PowerShell Script Analyzer settings file to the root of your workspace.
Tags : {PSScriptAnalyzer, settings}
TemplatePath : /Users/robb/.local/share/powershell/Modules/Plaster/1.1.3/Templates/AddPSScriptAnalyzerSettings
Title : New PowerShell Manifest Module
Author : Plaster
Version : 1.1.0
Description : Creates files for a simple, non-shared PowerShell script module.
Tags : {Module, ScriptModule, ModuleManifest}
TemplatePath : /Users/robb/.local/share/powershell/Modules/Plaster/1.1.3/Templates/NewPowerShellScriptModule
Title : New PowerShell Module Project
Author : R. L. Vandaveer
Version : 1.0.0
Description : Creates the structure for a new PowerShell module project
Tags : {PowerShell, module, project}
TemplatePath : /Users/robb/.local/share/powershell/Modules/HeliarPlasterTemplates/1.0.0/NewPowerShellModuleProject
The templates can be used by Invoke-Plaster -Template {full path to template} -DesitinationPath {path to destination}
. The following snippet can be helpful to find the full path to the template: (Get-PlasterTemplate -IncludeInstalledModules | Where-Object Title -eq '{title of the template}').TemplatePath
. Note that the {} in the preceeding examples denote code that should be replaced and would be excluded from your final code.
- TBD
- This project uses GitVersion to automatically version the PowerShell module and Nuget package generated. As long as the user is using Gitflow, no other steps should be necessary.
- Robb Vandaveer - Creator - Robb Vandaveer