From 9d69af657112bf85502fa8bd0359f35a2e18f3a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:46:14 +0000 Subject: [PATCH 1/3] Initial plan From bd2c4059bce04eaa2f0e5479f9831dc04cc5c5e1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:53:15 +0000 Subject: [PATCH 2/3] Add keybase.io devcontainer feature Co-authored-by: sebst <592313+sebst@users.noreply.github.com> --- .github/workflows/test.yaml | 2 + src/keybase.io/README.md | 23 ++++++++++ src/keybase.io/devcontainer-feature.json | 17 ++++++++ src/keybase.io/install.sh | 54 ++++++++++++++++++++++++ test/keybase.io/test.sh | 19 +++++++++ 5 files changed, 115 insertions(+) create mode 100644 src/keybase.io/README.md create mode 100644 src/keybase.io/devcontainer-feature.json create mode 100755 src/keybase.io/install.sh create mode 100755 test/keybase.io/test.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d1fba94..15bd8f1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,6 +24,7 @@ jobs: - deno.com - feature-installer - jj-vcs.dev + - keybase.io - nixos.org - opencode.ai - pkgx.sh @@ -62,6 +63,7 @@ jobs: - deno.com - feature-installer - jj-vcs.dev + - keybase.io - nixos.org - opencode.ai - pkgx.sh diff --git a/src/keybase.io/README.md b/src/keybase.io/README.md new file mode 100644 index 0000000..34d7f20 --- /dev/null +++ b/src/keybase.io/README.md @@ -0,0 +1,23 @@ +# keybase.io (keybase.io) + +Install "keybase" binary + +## Example Usage + +```json +"features": { + "ghcr.io/devcontainer-community/devcontainer-features/keybase.io:1": {} +} +``` + +## Options + +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| +| version | Currently unused. | string | latest | + + + +--- + +_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/devcontainer-community/devcontainer-features/blob/main/src/keybase.io/devcontainer-feature.json). Add additional notes to a `NOTES.md`._ diff --git a/src/keybase.io/devcontainer-feature.json b/src/keybase.io/devcontainer-feature.json new file mode 100644 index 0000000..f6ac492 --- /dev/null +++ b/src/keybase.io/devcontainer-feature.json @@ -0,0 +1,17 @@ +{ + "name": "keybase.io", + "id": "keybase.io", + "version": "1.0.0", + "description": "Install \"keybase\" binary", + "documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/keybase.io", + "options": { + "version": { + "type": "string", + "default": "latest", + "proposals": [ + "latest" + ], + "description": "Currently unused." + } + } +} diff --git a/src/keybase.io/install.sh b/src/keybase.io/install.sh new file mode 100755 index 0000000..6e529ea --- /dev/null +++ b/src/keybase.io/install.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -o errexit +set -o pipefail +set -o noclobber +set -o nounset +set -o allexport +readonly name="keybase" + +apt_get_update() { + if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update -y + fi +} + +apt_get_checkinstall() { + if ! dpkg -s "$@" >/dev/null 2>&1; then + apt_get_update + DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends --no-install-suggests --option 'Debug::pkgProblemResolver=true' --option 'Debug::pkgAcquire::Worker=1' "$@" + fi +} + +apt_get_cleanup() { + apt-get clean + rm -rf /var/lib/apt/lists/* +} + +echo_banner() { + local text="$1" + echo -e "\e[1m\e[97m\e[41m$text\e[0m" +} + +install() { + apt_get_checkinstall curl ca-certificates + architecture=$(dpkg --print-architecture) + case "${architecture}" in + amd64) arch_suffix="amd64" ;; + arm64) arch_suffix="arm64" ;; + *) + echo "Keybase does not support machine architecture '${architecture}'. Please use an x86-64 or ARM64 machine." + exit 1 + ;; + esac + local deb_file="keybase_${arch_suffix}.deb" + curl -fsSL "https://prerelease.keybase.io/${deb_file}" -o "/tmp/${deb_file}" + DEBIAN_FRONTEND=noninteractive apt-get install -y "/tmp/${deb_file}" + rm "/tmp/${deb_file}" + apt_get_cleanup +} + +echo_banner "devcontainer.community" +echo "Installing $name..." +install "$@" +echo "(*) Done!" diff --git a/test/keybase.io/test.sh b/test/keybase.io/test.sh new file mode 100755 index 0000000..5b362d4 --- /dev/null +++ b/test/keybase.io/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib +# Provides the 'check' and 'reportResults' commands. +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. Syntax is... +# check