Skip to content
Open
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
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"husky": {
"version": "0.7.1",
"commands": [
"husky"
],
"rollForward": false
}
}
}
7 changes: 4 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
root = true

[*]
end_of_line = crlf
end_of_line = lf
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{ps1, psm1}]
indent_style = space
[*.yml]
indent_size = 2
17 changes: 1 addition & 16 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
* text=auto

*.md text
*.gitattributes text

*.ps1 text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf
*.psc1 text eol=crlf
*.ps1xml text eol=crlf
*.clixml text eol=crlf
*.xml text eol=crlf
*.txt text eol=crlf

*.dll binary
*.exe binary
* text=auto eol=lf
35 changes: 35 additions & 0 deletions .github/workflows/publish-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Module

on:
workflow_dispatch:
inputs:
version:
description: "Version Number"
required: true

env:
API_KEY: ${{ secrets.PSGALLERY_API_TOKEN }}
RELEASE_VERSION: ${{ github.event.inputs.version }}

jobs:
deploy:
name: Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Build Dependencies
shell: pwsh
run: |
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Install-Module PSScriptAnalyzer
Install-Module SQLite

- name: Publish Module
shell: pwsh
run: |
pwsh -NoProfile -ExecutionPolicy ByPass -File "./scripts/publish.ps1" `
-Version ${{ env.RELEASE_VERSION }} `
-ApiKey ${{ env.API_KEY }} `
-Confirm:$false
29 changes: 29 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Build Dependencies
shell: pwsh
run: |
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Install-Module PSScriptAnalyzer
Install-Module SQLite

- name: Run Unit Tests
shell: pwsh
run: |
pwsh -NoProfile -ExecutionPolicy ByPass -File ./scripts/test.ps1 -Build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modules/*

4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

dotnet husky run --group pre-commit
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

dotnet husky run --group pre-push
63 changes: 63 additions & 0 deletions .husky/task-runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://alirezanet.github.io/Husky.Net/schema.json",
"tasks": [
{
"name": "unstage-manifest",
"group": "pre-commit",
"command": "git",
"args": [
"reset",
"HEAD",
"--",
"*.psd1"
]
},
{
"name": "restore-manifest",
"group": "pre-commit",
"command": "git",
"args": [
"restore",
"*.psd1"
]
},
{
"name": "build-module",
"group": "pre-push",
"command": "pwsh",
"args": [
"-NoProfile",
"-ExecutionPolicy",
"ByPass",
"-File",
"./scripts/build.ps1",
"-Version",
"0.0.0"
],
"include": [
"*.ps1",
"*.psm1",
"*.psd1",
"*.ps1xml"
]
},
{
"name": "test-module",
"group": "pre-push",
"command": "pwsh",
"args": [
"-NoProfile",
"-ExecutionPolicy",
"ByPass",
"-File",
"./scripts/test.ps1"
],
"include": [
"*.ps1",
"*.psm1",
"*.psd1",
"*.ps1xml"
]
}
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 2.0.0 (2024-12-01)

TODO

## Version 1.3.2 (2022-03-24)

Declare `OutputType` as strings to fix a bug which breaks `Get-Task` and `Get-TodoList`:
Expand Down
Loading