Skip to content

Commit 68536f6

Browse files
committed
✨ Add VSCode extensions to Update-Everything.ps1
- resolves #43
1 parent f0f8c17 commit 68536f6

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/pester.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- name: Check out repo
1212
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 2
1315
- name: Get changes
1416
id: changes
1517
uses: jitterbit/get-changed-files@v1

Update-Everything.ps1

+13-3
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,15 @@ Attempts to update packages, features, and system.
8686
#Requires -Version 3
8787
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost','',
8888
Justification='This script is not intended for pipelining.')]
89+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns','',
90+
Justification='Some of these functions may deal with multiple updates.')]
8991
[CmdletBinding()] Param(
9092
# The sources of updates to install, in order.
9193
[ValidateSet('Chocolatey','DellCommand','Dotnet','Essential','GitHubCli','Npm','ScriptsData',
92-
'PSHelp','PSModule','Scoop','WindowsUpdate','WindowsStore','WinGet')]
94+
'PSHelp','PSModule','Scoop','VSCodeExtenions','WindowsUpdate','WindowsStore','WinGet')]
9395
[Parameter(Position=0,ValueFromRemainingArguments=$true)][string[]] $Steps =
94-
@('Essential','WindowsStore','Scoop','Chocolatey','WinGet','Npm','Dotnet',
95-
'GitHubCli','ScriptsData','PSModule','PSHelp','DellCommand','WindowsUpdate')
96+
@('Essential','WindowsStore','Scoop','Chocolatey','WinGet','Npm','Dotnet','GitHubCli',
97+
'VSCodeExtensions','ScriptsData','PSModule','PSHelp','DellCommand','WindowsUpdate')
9698
)
9799
Begin
98100
{
@@ -220,6 +222,14 @@ Begin
220222
gh extension upgrade --all
221223
}
222224

225+
function Update-VSCodeExtenions
226+
{
227+
if(!(Get-Command code -ErrorAction Ignore))
228+
{Write-Verbose 'VSCode not found, skipping.'; return}
229+
Write-Step "$UP Updating VSCode extensions"
230+
code --update-extensions
231+
}
232+
223233
function Update-PSModule
224234
{
225235
Write-Step "$UP Updating PowerShell modules"

0 commit comments

Comments
 (0)