Skip to content

Commit

Permalink
Merge branch 'release/v1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
abbgrade committed Jul 30, 2022
2 parents b6a597f + c0d372c commit 0aa4730
Show file tree
Hide file tree
Showing 21 changed files with 613 additions and 39 deletions.
17 changes: 17 additions & 0 deletions .build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

[CmdletBinding()]
param (
[Parameter()]
[int] $BuildNumber
)

$ModuleName = 'PsBuildTasks'

. $PSScriptRoot/tasks/PowerShell-Matrix.Tasks.ps1
. $PSScriptRoot/tasks/Build.Tasks.ps1

task InstallBuildDependencies {
Install-Module platyPs -Scope CurrentUser
}
task InstallTestDependencies {}
task InstallReleaseDependencies {}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [abbgrade]
9 changes: 9 additions & 0 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
on:
push:
branches: [ develop, bugfix/*, feature/*, release/* ]
pull_request:
branches: [ develop ]

jobs:
build-validation:
uses: abbgrade/PsBuildTasks/.github/workflows/[email protected]
13 changes: 13 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
push:
branches: [ release/* ]
workflow_dispatch:

jobs:
pre-release:
uses: abbgrade/PsBuildTasks/.github/workflows/[email protected]
with:
module-name: PsBuildTasks
secrets:
ps-gallery-key: ${{ secrets.PS_GALLERY_KEY }}

13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
release:
uses: abbgrade/PsBuildTasks/.github/workflows/[email protected]
with:
module-name: PsBuildTasks
secrets:
ps-gallery-key: ${{ secrets.PS_GALLERY_KEY }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
publish
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"vector-of-bool.gitflow"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cSpell.language": "en",
"cSpell.words": [
"pwsh"
]
}
76 changes: 76 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "pwsh.exe",
"args": [
"-NoProfile",
"-ExecutionPolicy Bypass",
"-NonInteractive",
"-Command"
]
}
}
},
"linux": {
"options": {
"shell": {
"executable": "/usr/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
}
}
},
"osx": {
"options": {
"shell": {
"executable": "/usr/local/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
}
}
},
"tasks": [
{
"label": "Build",
"type": "shell",
"group": "build",
"command": "Invoke-Build Build",
"problemMatcher": []
},
{
"label": "Clean",
"type": "shell",
"command": "Invoke-Build Clean",
"problemMatcher": []
},
{
"label": "Install",
"type": "shell",
"command": "Invoke-Build Install",
"problemMatcher": []
},
{
"label": "Update docs",
"type": "shell",
"command": "Invoke-Build UpdateDocs",
"problemMatcher": []
},
{
"label": "Test",
"group": "test",
"type": "shell",
"command": "Invoke-Pester",
"options": {
"cwd": "test"
},
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
},
"dependsOn": "Build"
},
]
}
72 changes: 38 additions & 34 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Update tasks.
- GitHub Pages config.
- Dependabot config.

### Fixed

- Dotnet-Matrix.Tasks does not fail in empty project.
- Wrong file separators for linux.

## [1.1.0] - 2022-03-19

### Added

- Added test reports to pester tests.

## [1.0.0] - 2022-03-13

### Added

- VSCode Tasks.
- GitHub Action Workflows.

<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.2.0] - 2022-07-30

### Added

- Update tasks.
- GitHub Pages config.
- Dependabot config.
- PowerShell module with install command.

### Fixed

- Dotnet-Matrix.Tasks does not fail in empty project.
- PowerShell-Matrix.Tasks does not fail in empty project.
- Wrong file separators for linux.

## [1.1.0] - 2022-03-19

### Added

- Added test reports to pester tests.

## [1.0.0] - 2022-03-13

### Added

- VSCode Tasks.
- GitHub Action Workflows.

<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->
22 changes: 22 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ This includes:
- [InvokeBuild](https://github.com/nightroman/Invoke-Build) tasks.
- [GitHub Actions](https://docs.github.com/en/actions) workflows.

## Getting Started

There is a PowerShell module to manage PsBuildTasks and helps with it's installation.
Get it with `Install-Module -Name PsBuildTasks`.
The next step depends on your project.

1. If your project is written in PowerShell or DotNet/C#.
2. If your project supports only Windows or is cross platform and requires matrix tests on Windows and Linux.

There are container tasks that update multiple features of PsBuildTasks

### PowerShell Matrix

Go to the project root directory

```powershell
Import-Module -Name PsBuildTasks
Install-PsBuildTask -Path . -Task PowerShell-Matrix
$ModuleName = 'MyModuleName'
Invoke-Build -File .\tasks\PsBuild.Tasks.ps1 -Task UpdatePsBuildTasks
```

## InvokeBuild Tasks

It provides the following tasks:
Expand Down
4 changes: 2 additions & 2 deletions VsCode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
"type": "shell",
"command": "Invoke-Pester",
"options": {
"cwd": "test"
"cwd": "${workspaceFolder}/test"
},
"problemMatcher": "$msCompile",
"presentation": {
"echo": false,
"showReuseMessage": false
},
"dependsOn": "Build"
},
}
]
}
87 changes: 87 additions & 0 deletions docs/Install-PsBuildTask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
external help file: PsBuildTasks-help.xml
Module Name: PsBuildTasks
online version:
schema: 2.0.0
---

# Install-PsBuildTask

## SYNOPSIS
Install PsBuildTasks task file.

## SYNTAX

```
Install-PsBuildTask [-Path] <DirectoryInfo> [-Task] <String> [[-Commit] <String>] [<CommonParameters>]
```

## DESCRIPTION
Downloads a task file and saves it to the tasks directory.

## EXAMPLES

### Example 1
```powershell
PS C:\> {{ Add example code here }}
```

{{ Add example description here }}

## PARAMETERS

### -Path
Path to the tasks directory.

```yaml
Type: DirectoryInfo
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Task
Name of the task file to install.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Commit
Specifies a revision by commit id.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Main
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS
Loading

0 comments on commit 0aa4730

Please sign in to comment.