Skip to content

Commit 732822d

Browse files
cmbroseCopilot
andauthored
Add default copilot update to postStartCommand (#1624)
* Add postStartCommand to devcontainer feature * Bump version of copilot-cli to 1.1.0 * feat: conditionally run copilot update based on use-latest flag file Agent-Logs-Url: https://github.com/cmbrose/devcontainer-features/sessions/3627c9ec-26ad-486e-a1ae-a4159d1ec2c5 Co-authored-by: cmbrose <[email protected]> * Bump version of copilot-cli to 1.1.1 * Update devcontainer-feature.json * Modify flag file creation for CLI version checks Updated the condition to create a flag file for both 'latest' and 'prerelease' versions. * Update postStartCommand for Copilot CLI * Fix conditional check for CLI version * Bump version of copilot-cli to 1.1.2 --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent 87bc907 commit 732822d

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/copilot-cli/devcontainer-feature.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "copilot-cli",
3-
"version": "1.0.0",
3+
"version": "1.1.2",
44
"name": "GitHub Copilot CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/copilot-cli",
66
"description": "Installs the GitHub Copilot CLI.",
@@ -15,6 +15,7 @@
1515
"description": "Select version of the GitHub Copilot CLI, if not latest."
1616
}
1717
},
18+
"postStartCommand": "[ -f /etc/devcontainer-copilot-cli/auto-update ] && copilot update || true",
1819
"customizations": {
1920
"vscode": {
2021
"settings": {

src/copilot-cli/install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,9 @@ echo "Downloading GitHub Copilot CLI..."
8080

8181
install_using_github
8282

83+
# Create a flag file if using "latest" or "prerelease" so the postStartCommand knows to auto-update
84+
if [ "${CLI_VERSION}" = "latest" ] || [ "${CLI_VERSION}" = "prerelease" ]; then
85+
mkdir -p /etc/devcontainer-copilot-cli
86+
touch /etc/devcontainer-copilot-cli/auto-update
87+
fi
88+

0 commit comments

Comments
 (0)