Skip to content

Commit 098285c

Browse files
authored
Merge pull request #1 from pwshdevs/develop
Develop
2 parents 50730d2 + 34317c1 commit 098285c

5 files changed

Lines changed: 162 additions & 331 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
2-
"name": "PowerShell",
3-
"dockerFile": "Dockerfile",
4-
"customizations": {
5-
"vscode": {
6-
"settings": {
7-
"terminal.integrated.profiles.linux": {
8-
"bash": {
9-
"path": "usr/bin/bash",
10-
"icon": "terminal-bash"
11-
},
12-
"zsh": {
13-
"path": "usr/bin/zsh"
14-
},
15-
"pwsh": {
16-
"path": "/usr/bin/pwsh",
17-
"icon": "terminal-powershell"
18-
}
19-
},
20-
"terminal.integrated.defaultProfile.linux": "pwsh"
21-
},
22-
"extensions": ["ms-vscode.powershell", "davidanson.vscode-markdownlint"]
23-
}
24-
},
25-
"postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'"
2+
"name": "PowerShell",
3+
"dockerFile": "Dockerfile",
4+
"customizations": {
5+
"vscode": {
6+
"settings": {
7+
"terminal.integrated.profiles.linux": {
8+
"bash": {
9+
"path": "usr/bin/bash",
10+
"icon": "terminal-bash"
11+
},
12+
"zsh": {
13+
"path": "usr/bin/zsh"
14+
},
15+
"pwsh": {
16+
"path": "/usr/bin/pwsh",
17+
"icon": "terminal-powershell"
18+
}
19+
},
20+
"terminal.integrated.defaultProfile.linux": "pwsh"
21+
},
22+
"extensions": ["ms-vscode.powershell", "davidanson.vscode-markdownlint"]
23+
}
24+
},
25+
"postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'"
2626
}
2727

.github/workflows/publish.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Module
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
steps:
11+
# Get the current version
12+
- uses: actions/checkout@v3
13+
- name: Install and cache PowerShell modules
14+
id: psmodulecache
15+
uses: potatoqualitee/psmodulecache@v6.2.1
16+
with:
17+
modules-to-cache: BuildHelpers, Pester, psake, PowerShellBuild, PSScriptAnalyzer
18+
- shell: pwsh
19+
# Give an id to the step, so we can reference it later
20+
id: check_if_versions_bumped
21+
run: |
22+
[version]$GalleryVersion = Get-NextNugetPackageVersion -Name PSFluentObjectValidation -ErrorAction Stop
23+
[version]$GithubVersion = Get-MetaData -Path ./PSFluentObjectValidation/PSFluentObjectValidation.psd1 -PropertyName ModuleVersion -ErrorAction Stop
24+
$bumped = $GithubVersion -ge $GalleryVersion
25+
26+
# Set the output named "version_bumped"
27+
Write-Host "::set-output name=version_bumped::$bumped"
28+
29+
- name: Publish to PSGallery
30+
shell: pwsh
31+
if: steps.check_if_versions_bumped.outputs.version_bumped == 'True'
32+
env:
33+
PSGALLERY_API_KEY: ${{ secrets.PS_GALLERY_KEY }}
34+
run: ./build.ps1 -Task Publish

.vscode/tasks.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
{
3434
"label": "Clean",
3535
"type": "shell",
36-
"command": "${cwd}/build.ps1 -Task Clean -Verbose"
36+
"command": "cd '${cwd}' && ./build.ps1 -Task Clean -Verbose"
3737
},
3838
{
3939
"label": "Test",
4040
"type": "shell",
41-
"command": "${cwd}/build.ps1 -Task Test -Verbose",
41+
"command": "cd '${cwd}' && ./build.ps1 -Task Test -Verbose",
4242
"group": {
4343
"kind": "test",
4444
"isDefault": true
@@ -48,18 +48,18 @@
4848
{
4949
"label": "Analyze",
5050
"type": "shell",
51-
"command": "${cwd}/build.ps1 -Task Analyze -Verbose"
51+
"command": "cd '${cwd}' && ./build.ps1 -Task Analyze -Verbose"
5252
},
5353
{
5454
"label": "Pester",
5555
"type": "shell",
56-
"command": "${cwd}/build.ps1 -Task Pester -Verbose",
56+
"command": "cd '${cwd}' && ./build.ps1 -Task Pester -Verbose",
5757
"problemMatcher": "$pester"
5858
},
5959
{
6060
"label": "Build",
6161
"type": "shell",
62-
"command": "${cwd}/build.ps1 -Task Build -Verbose",
62+
"command": "cd '${cwd}' && ./build.ps1 -Task Build -Verbose",
6363
"group": {
6464
"kind": "build",
6565
"isDefault": true
@@ -68,7 +68,7 @@
6868
{
6969
"label": "Publish",
7070
"type": "shell",
71-
"command": "${cwd}/build.ps1 -Task Publish -Verbose"
71+
"command": "cd '${cwd}' && ./build.ps1 -Task Publish -Verbose"
7272
}
7373
]
7474
}

PSFluentObjectValidation/PSFluentObjectValidation.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
Author = 'Joshua Wilson'
66
CompanyName = 'PwshDevs'
77
Copyright = '(c) 2025 PwshDevs. All rights reserved.'
8-
Description = 'Contains a helper class and functions to validate object.'
8+
Description = 'Contains a helper class and functions to validate objects.'
99
PowerShellVersion = '5.1'
1010
FunctionsToExport = @('Test-Exists', 'Assert-Exists')
1111
CmdletsToExport = @()
1212
VariablesToExport = '*'
1313
AliasesToExport = @('exists', 'asserts', 'tests')
1414
PrivateData = @{
1515
PSData = @{
16-
Tags = @()
17-
LicenseUri = ''
16+
Tags = @('Validation', 'Object', 'Fluent', 'Helper', 'Assert', 'Test', 'Exists')
17+
LicenseUri = 'https://github.com/pwshdevs/PSFluentObjectValidation/blob/main/LICENSE'
1818
ProjectUri = 'https://github.com/pwshdevs/PSFluentObjectValidation'
1919
ReleaseNotes = ''
2020
}

0 commit comments

Comments
 (0)