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
48 changes: 24 additions & 24 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "PowerShell",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "usr/bin/bash",
"icon": "terminal-bash"
},
"zsh": {
"path": "usr/bin/zsh"
},
"pwsh": {
"path": "/usr/bin/pwsh",
"icon": "terminal-powershell"
}
},
"terminal.integrated.defaultProfile.linux": "pwsh"
},
"extensions": ["ms-vscode.powershell", "davidanson.vscode-markdownlint"]
}
},
"postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'"
"name": "PowerShell",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "usr/bin/bash",
"icon": "terminal-bash"
},
"zsh": {
"path": "usr/bin/zsh"
},
"pwsh": {
"path": "/usr/bin/pwsh",
"icon": "terminal-powershell"
}
},
"terminal.integrated.defaultProfile.linux": "pwsh"
},
"extensions": ["ms-vscode.powershell", "davidanson.vscode-markdownlint"]
}
},
"postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'"
}

34 changes: 34 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Module
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
# Get the current version
- uses: actions/checkout@v3
- name: Install and cache PowerShell modules
id: psmodulecache
uses: potatoqualitee/psmodulecache@v6.2.1
with:
modules-to-cache: BuildHelpers, Pester, psake, PowerShellBuild, PSScriptAnalyzer
- shell: pwsh
# Give an id to the step, so we can reference it later
id: check_if_versions_bumped
run: |
[version]$GalleryVersion = Get-NextNugetPackageVersion -Name PSFluentObjectValidation -ErrorAction Stop
[version]$GithubVersion = Get-MetaData -Path ./PSFluentObjectValidation/PSFluentObjectValidation.psd1 -PropertyName ModuleVersion -ErrorAction Stop
$bumped = $GithubVersion -ge $GalleryVersion

# Set the output named "version_bumped"
Write-Host "::set-output name=version_bumped::$bumped"

- name: Publish to PSGallery
shell: pwsh
if: steps.check_if_versions_bumped.outputs.version_bumped == 'True'
env:
PSGALLERY_API_KEY: ${{ secrets.PS_GALLERY_KEY }}
run: ./build.ps1 -Task Publish
12 changes: 6 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
{
"label": "Clean",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Clean -Verbose"
"command": "cd '${cwd}' && ./build.ps1 -Task Clean -Verbose"
},
{
"label": "Test",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Test -Verbose",
"command": "cd '${cwd}' && ./build.ps1 -Task Test -Verbose",
"group": {
"kind": "test",
"isDefault": true
Expand All @@ -48,18 +48,18 @@
{
"label": "Analyze",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Analyze -Verbose"
"command": "cd '${cwd}' && ./build.ps1 -Task Analyze -Verbose"
},
{
"label": "Pester",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Pester -Verbose",
"command": "cd '${cwd}' && ./build.ps1 -Task Pester -Verbose",
"problemMatcher": "$pester"
},
{
"label": "Build",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Build -Verbose",
"command": "cd '${cwd}' && ./build.ps1 -Task Build -Verbose",
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -68,7 +68,7 @@
{
"label": "Publish",
"type": "shell",
"command": "${cwd}/build.ps1 -Task Publish -Verbose"
"command": "cd '${cwd}' && ./build.ps1 -Task Publish -Verbose"
}
]
}
6 changes: 3 additions & 3 deletions PSFluentObjectValidation/PSFluentObjectValidation.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
Author = 'Joshua Wilson'
CompanyName = 'PwshDevs'
Copyright = '(c) 2025 PwshDevs. All rights reserved.'
Description = 'Contains a helper class and functions to validate object.'
Description = 'Contains a helper class and functions to validate objects.'
PowerShellVersion = '5.1'
FunctionsToExport = @('Test-Exists', 'Assert-Exists')
CmdletsToExport = @()
VariablesToExport = '*'
AliasesToExport = @('exists', 'asserts', 'tests')
PrivateData = @{
PSData = @{
Tags = @()
LicenseUri = ''
Tags = @('Validation', 'Object', 'Fluent', 'Helper', 'Assert', 'Test', 'Exists')
LicenseUri = 'https://github.com/pwshdevs/PSFluentObjectValidation/blob/main/LICENSE'
ProjectUri = 'https://github.com/pwshdevs/PSFluentObjectValidation'
ReleaseNotes = ''
}
Expand Down
Loading
Loading