Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 27 additions & 16 deletions .github/workflows/PesterReports.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# spell-checker:ignore potatoqualitee psdepend psmodulecache
name: PesterReports
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
checks: write
pull-requests: write

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -21,40 +23,49 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
# Setup Build Helpers
- name: SetupBuildHelpers
- uses: actions/checkout@v4
- name: Install and cache PSDepend
id: psdepend
uses: potatoqualitee/psmodulecache@v6.2.1
with:
modules-to-cache: PSDepend:0.3.8
- name: Determine modules to cache
shell: pwsh
id: modules-to-cache
run: |
Install-Module BuildHelpers -Scope CurrentUser -Force | Out-Null
Install-Module PowerShellBuild -Scope CurrentUser -Force | Out-Null
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force | Out-Null
Install-Module platyPS -Scope CurrentUser -Force | Out-Null
$dependencies = Get-Dependency
$f = $dependencies | ?{ $_.DependencyType -eq 'PSGalleryModule' } | %{ "{0}:{1}" -F $_.DependencyName, $_.Version}
Write-Output "::set-output name=ModulesToCache::$($f -join ', ')"
- name: Install and cache PowerShell modules
id: psmodulecache
uses: potatoqualitee/psmodulecache@v6.2.1
with:
modules-to-cache: ${{ steps.modules-to-cache.outputs.ModulesToCache }}
shell: pwsh
- name: Test
shell: pwsh
run: |
./build.ps1 -Task Test
run: ./build.ps1 -Task Test
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.6.2
with:
name: Unit Test Results (OS ${{ matrix.os }})
path: ./tests/Out/testResults.xml
path: ./tests/out/testResults.xml

publish-test-results:
name: "Publish Unit Tests Results"
needs: test
runs-on: ubuntu-latest
# the test job might be skipped, we don't need to run this job then
if: success() || failure()
if: (!cancelled())

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.3.0
with:
path: artifacts

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2.20.0
with:
files: artifacts/**/*.xml
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
// When enabled, will trim trailing whitespace when you save a file.
"files.trimTrailingWhitespace": true,
"search.exclude": {
"Release": true
"Release": true,
"Output": true,
},
"editor.tabSize": 4,
//-------- PowerShell Configuration --------
// Use a custom PowerShell Script Analyzer settings file for this workspace.
// Relative paths for this setting are always relative to the workspace root dir.
Expand Down
49 changes: 33 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,60 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",

// Start PowerShell
"windows": {
"options": {
"shell": {
"executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"args": [ "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command" ]
"executable": "pwsh.exe",
"args": [
"-NoProfile",
"-ExecutionPolicy",
"Bypass",
"-Command"
]
}
}
},
"linux": {
"options": {
"shell": {
"executable": "/usr/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
"args": [
"-NoProfile",
"-Command"
]
}
}
},
"osx": {
"options": {
"shell": {
"executable": "/usr/local/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
"args": [
"-NoProfile",
"-Command"
]
}
}
},

// Associate with test task runner
"tasks": [
{
"label": "Bootstrap",
"type": "shell",
"command": "./build.ps1 -Task Init -Bootstrap",
"problemMatcher": []
},
{
"label": "Clean",
"type": "shell",
"command": "Invoke-psake build.psake.ps1 -taskList Clean",
"command": "./build.ps1 -Task Clean",
"problemMatcher": []
},
{
"label": "Build",
"type": "shell",
"command": "Invoke-psake build.psake.ps1 -taskList Build",
"command": "./build.ps1 -Task Build",
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -50,36 +65,38 @@
{
"label": "BuildHelp",
"type": "shell",
"command": "Invoke-psake build.psake.ps1 -taskList BuildHelp",
"command": "./build.ps1 -Task BuildHelp",
"problemMatcher": []
},
{
"label": "Analyze",
"type": "shell",
"command": "Invoke-psake build.psake.ps1 -taskList Analyze",
"command": "./build.ps1 -Task Analyze",
"problemMatcher": []
},
{
"label": "Install",
"type": "shell",
"command": "Invoke-psake build.psake.ps1 -taskList Install",
"command": "./build.ps1 -Task Install",
"problemMatcher": []
},
{
"label": "Publish",
"type": "shell",
"command": "Invoke-psake build.psake.ps1 -taskList Publish",
"command": "./build.ps1 -Task Publish",
"problemMatcher": []
},
{
"label": "Test",
"type": "shell",
"command": "Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true}",
"command": "./build.ps1 -Task Test",
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": [ "$pester" ]
"problemMatcher": [
"$pester"
]
}
]
}
]
}
31 changes: 13 additions & 18 deletions Plaster/Plaster.psd1
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Plaster.psm1'
RootModule = 'Plaster.psm1'

# ID used to uniquely identify this module
GUID = 'cfce3c5e-402f-412a-a83a-7b7ee9832ff4'
GUID = 'cfce3c5e-402f-412a-a83a-7b7ee9832ff4'

# Version number of this module.
ModuleVersion = '2.0.0'
ModuleVersion = '2.0.0'

# Supported PSEditions
CompatiblePSEditions = @('Desktop', 'Core')

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a
# PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
Tags = @('Plaster', 'CodeGenerator', 'Scaffold', 'Template', 'JSON', 'PowerShell7')
Tags = @('Plaster', 'CodeGenerator', 'Scaffold', 'Template', 'JSON', 'PowerShell7')

# A URL to the license for this module.
LicenseUri = 'https://github.com/PowerShellOrg/Plaster/blob/master/LICENSE'
Expand Down Expand Up @@ -61,16 +61,16 @@ For the complete changelog, see: https://github.com/PowerShellOrg/Plaster/blob/m
}

# Author of this module
Author = 'PowerShell.org'
Author = 'PowerShell.org'

# Company or vendor of this module
CompanyName = 'PowerShell.org'
CompanyName = 'PowerShell.org'

# Copyright statement for this module
Copyright = '(c) PowerShell.org 2016-2025. All rights reserved.'
Copyright = '(c) PowerShell.org 2016-2025. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Plaster is a template-based file and project generator written in PowerShell. Create consistent PowerShell projects with customizable templates supporting both XML and JSON formats.'
Description = 'Plaster is a template-based file and project generator written in PowerShell. Create consistent PowerShell projects with customizable templates supporting both XML and JSON formats.'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.1'
Expand Down Expand Up @@ -99,21 +99,16 @@ For the complete changelog, see: https://github.com/PowerShellOrg/Plaster/blob/m
# Functions to export from this module - explicitly list each function that should be
# exported. This improves performance of PowerShell when discovering the commands in
# module.
FunctionsToExport = @(
'Invoke-Plaster'
'New-PlasterManifest'
'Get-PlasterTemplate'
'Test-PlasterManifest'
)
FunctionsToExport = '*'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
CmdletsToExport = '*'

# Variables to export from this module
# VariablesToExport = @()
VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @()
AliasesToExport = @()

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
Loading
Loading