Skip to content

Commit

Permalink
Merge branch 'develop' into release/1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen committed Aug 18, 2022
2 parents de8ba1b + 89971e7 commit 7c27541
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ on:

jobs:
build-validation:
uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@v1.1
uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@1.4.0
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
pre-release:
uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@v1.1
uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@1.4.0
with:
module-name: PsSmo
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
release:
uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@v1.1
uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@1.4.0
with:
module-name: PsSmo
secrets:
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"
},
}
]
}
2 changes: 1 addition & 1 deletion docs/Disconnect-SmoInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Aliases: Connection
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
Expand Down
8 changes: 8 additions & 0 deletions src/PsSmo/DisconnectInstanceCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ namespace PsSmo
public class DisconnectInstanceCommand : ClientCommand
{

[Parameter(
Position = 0,
ValueFromPipeline = true
)]
[ValidateNotNullOrEmpty()]
[Alias("Connection")]
public Server Instance { get; set; } = ConnectInstanceCommand.Instance;

protected override void ProcessRecord()
{
base.ProcessRecord();
Expand Down
26 changes: 20 additions & 6 deletions tasks/PsBuild.Tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,38 @@ task UpdateBuildTasks {
#region GitHub Actions

task UpdateValidationWorkflow {
[System.IO.FileInfo] $file = "$PSScriptRoot/../.github/workflows/build-validation.yml"
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/build-validation-matrix.yml' `
-OutFile "$PSScriptRoot\..\.github\workflows\build-validation.yml"
-OutFile $file
}

task UpdatePreReleaseWorkflow {
requires ModuleName
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\pre-release.yml"
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/pre-release-windows.yml' |
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
Out-File "$PSScriptRoot\..\.github\workflows\pre-release.yml" -NoNewline
Out-File $file -NoNewline
}

task UpdateReleaseWorkflow {
requires ModuleName
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\release.yml"
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/release-windows.yml' |
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
Out-File "$PSScriptRoot\..\.github\workflows\release.yml" -NoNewline
Out-File $file -NoNewline
}

#endregion
#region GitHub Pages

task UpdateIndexPage {
New-Item -Type Directory "$PSScriptRoot\..\docs" -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/docs/index.md' `
-OutFile "$PSScriptRoot\..\docs\index.md"
Expand All @@ -45,19 +54,24 @@ task UpdateIndexPage {
#region GitHub Dependabot

task UpdateDependabotConfig {
requires ModuleName
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\dependabot.yml"
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/dependabot/dependabot.yml' |
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
Out-File "$PSScriptRoot\..\.github\dependabot.yml" -NoNewline
Out-File $file -NoNewline
}

#endregion
#region VsCode

task UpdateVsCodeTasks {
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.vscode\tasks.json"
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/VsCode/tasks.json' `
-OutFile "$PSScriptRoot\..\.vscode\tasks.json"
-OutFile $file
}

#endregion
Expand All @@ -71,4 +85,4 @@ task UpdatePsBuildTasksTasks {

#endregion

task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateValidationWorkflow, UpdatePreReleaseWorkflow, UpdateIndexPage, UpdateReleaseWorkflow, UpdateVsCodeTasks, UpdatePsBuildTasksTasks
task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateValidationWorkflow, UpdatePreReleaseWorkflow, UpdateReleaseWorkflow, UpdateIndexPage, UpdateDependabotConfig, UpdateVsCodeTasks, UpdatePsBuildTasksTasks

0 comments on commit 7c27541

Please sign in to comment.