https://github.com/tonypags/PsModuleTemplate
Scaffolding for PowerShell Modules.
https://github.com/tonypags/PsModuleTemplate
Last synced: 4 months ago
JSON representation
Scaffolding for PowerShell Modules.
- Host: GitHub
- URL: https://github.com/tonypags/PsModuleTemplate
- Owner: tonypags
- Created: 2021-07-02T16:18:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T20:07:00.000Z (about 1 year ago)
- Last Synced: 2024-08-13T07:06:35.225Z (8 months ago)
- Language: PowerShell
- Size: 40 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - tonypags/PsModuleTemplate - Scaffolding for PowerShell Modules. (PowerShell)
README
# Introduction
Scaffolding for PowerShell Modules.
# Getting Started
1. Installation processWithout Repository available, clone directly from Git:
$CloneType = 'https' # HTTPS or SSH
$ModuleName = 'PsModuleTemplate'
$ProjectName = '' # VSTS only, use $null if github
$OrgName = 'tonypags'$uri = if $(ProjectName) {
if ($CloneType -eq 'https') {
"https://$($OrgName)@dev.azure.com/$($OrgName)/$($ProjectName)/_git/$($ModuleName)"
} else {
"[email protected]:v3/$($OrgName)/$($ProjectName)/$($ModuleName)"
}
} else {
if ($CloneType -eq 'https') {
"https://github.com/$($OrgName)/$($ModuleName).git"
} else {
"[email protected]:$($OrgName)/$(ModuleName).git"
}
}
$ModuleParent = $env:PSModulePath -split ';' | Where {$_ -like "*$($env:USERNAME)*"} | Select -First 1
Set-Location $ModuleParent
git clone $uri
2. Build a new Module:
cd PsModuleTemplate
& .\Scripts\Start-ThisPlaster.ps1
3. Dependencies
This module has the following PowerShell Dependancies:
Plaster PesterThis module has the following Software Dependancies:
This module has no dependancies other than a supported Windows OS.
4. Version History
- v0.1.0.1 - Initial Commit.
- v0.1.1.2 - Added more info to readme template, private test file.
- v0.1.5.3 - Adding Plaster template, starting migration to Plaster.
# Build, Test, and Publish
0. Pester test.
1. Get next version number `v#.#.#.#` and a comment `[string]` for the change log.
2. Create a new Package folder as .\Package\v#.#.#.#\
3. Copy the PSD1 files in as-is.
Update the version number and copyright date if required.
Update the Exported Function Name array with the basenames of the files under the .\ folder only.
4. Create a new, blank PSM1 file in here.
Populate it with all of the PS1 files' content from the .\ and .\Private folders.
5. Create a NUSPEC file and update the version and change log.
6. Build the NuGet package.
7. Push to private repo.
# Contribute
1. Add your changes to a new feature branch.
2. Add Pester tests for your changes.
3. Push your branch to origin.
4. Submit a PR with description of changes.
5. Follow up in 2 business days.