File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ cd copilot-toolkit
6464./install-extensions.sh
6565```
6666
67+ To install only specific extensions:
68+
69+ ``` bash
70+ ./install-extensions.sh ado-build-watcher # just the build watcher
71+ .\i nstall-extensions.ps1 ado-pr-watcher # just the PR watcher
72+ ```
73+
6774After installing, run ` /clear ` in the Copilot CLI or restart it to load the new extensions.
6875
6976### Update
Original file line number Diff line number Diff line change 11# install-extensions.ps1 — Install Copilot CLI extensions from this repo
22# Works on Windows PowerShell 5.1+ and pwsh 7+
3+ #
4+ # Usage:
5+ # .\install-extensions.ps1 # Install all extensions
6+ # .\install-extensions.ps1 ado-build-watcher # Install only ado-build-watcher
7+ # .\install-extensions.ps1 ado-pr-watcher ado-build-watcher # Install specific ones
8+
9+ param (
10+ [Parameter (ValueFromRemainingArguments )]
11+ [string []]$Only
12+ )
313
414$ErrorActionPreference = " Stop"
515
@@ -18,7 +28,20 @@ if (-not (Test-Path $sourceDir)) {
1828 exit 1
1929}
2030
21- $extensions = @ (" ado-pr-watcher" , " ado-build-watcher" )
31+ $allExtensions = @ (" ado-pr-watcher" , " ado-build-watcher" )
32+ if ($Only -and $Only.Count -gt 0 ) {
33+ $extensions = @ ($Only | Where-Object { $allExtensions -contains $_ })
34+ $invalid = @ ($Only | Where-Object { $allExtensions -notcontains $_ })
35+ if ($invalid.Count -gt 0 ) {
36+ Write-Warning " Unknown extension(s): $ ( $invalid -join ' , ' ) . Available: $ ( $allExtensions -join ' , ' ) "
37+ }
38+ if ($extensions.Count -eq 0 ) {
39+ Write-Error " No valid extensions specified."
40+ exit 1
41+ }
42+ } else {
43+ $extensions = $allExtensions
44+ }
2245$sharedDirs = @ (" lib" )
2346[string []]$installed = @ ()
2447
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22# install-extensions.sh — Install Copilot CLI extensions from this repo
33# Works on macOS and Linux
4+ #
5+ # Usage:
6+ # ./install-extensions.sh # Install all extensions
7+ # ./install-extensions.sh ado-build-watcher # Install only ado-build-watcher
8+ # ./install-extensions.sh ado-pr-watcher ado-build-watcher # Install specific ones
49
510set -euo pipefail
611
@@ -16,7 +21,29 @@ if [ ! -d "$SOURCE_DIR" ]; then
1621 exit 1
1722fi
1823
19- EXTENSIONS=(" ado-pr-watcher" " ado-build-watcher" )
24+ ALL_EXTENSIONS=(" ado-pr-watcher" " ado-build-watcher" )
25+
26+ if [ $# -gt 0 ]; then
27+ EXTENSIONS=()
28+ for arg in " $@ " ; do
29+ found=0
30+ for valid in " ${ALL_EXTENSIONS[@]} " ; do
31+ if [ " $arg " = " $valid " ]; then found=1; break ; fi
32+ done
33+ if [ " $found " -eq 1 ]; then
34+ EXTENSIONS+=(" $arg " )
35+ else
36+ echo " Warning: Unknown extension '$arg '. Available: ${ALL_EXTENSIONS[*]} "
37+ fi
38+ done
39+ if [ ${# EXTENSIONS[@]} -eq 0 ]; then
40+ echo " Error: No valid extensions specified." >&2
41+ exit 1
42+ fi
43+ else
44+ EXTENSIONS=(" ${ALL_EXTENSIONS[@]} " )
45+ fi
46+
2047SHARED_DIRS=(" lib" )
2148INSTALLED=()
2249
You can’t perform that action at this time.
0 commit comments