Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
| [jj-vcs.dev](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/jj-vcs.dev) | `jj` — Git-compatible distributed VCS | gh release | 1.0.2 |
| [jnsahaj/lumen](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/jnsahaj-lumen) | `lumen` — AI-powered commit message generator | cargo | 1.0.0 |
| [joelhooks/agent-secrets](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/joelhooks-agent-secrets) | `secrets` — manage secrets for AI agents | gh release | 1.0.1 |
| [jonas/tig](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/jonas-tig) | `tig` — text-mode interface for Git | apt | 1.0.0 |
| [jq](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/jq) | `jq` — command-line JSON processor | apt | 1.0.0 |
| [k9scli.io](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/k9scli.io) | `k9s` — terminal UI for Kubernetes clusters | gh release | 1.0.1 |
| [keybase.io](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/keybase.io) | `keybase` — cryptographic identity and encrypted file sharing | curl | 1.2.0 |
Expand Down
17 changes: 17 additions & 0 deletions src/jonas-tig/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# jonas/tig

## Project

- [jonas/tig](https://jonas.github.io/tig/)

## Description

A text-mode interface for Git. `tig` allows you to browse and interact with Git repositories from the terminal, providing a curses-based UI for common Git operations.

## Installation Method

Installed via the system APT package manager (`apt-get install tig`).

## Other Notes

_No additional notes._
17 changes: 17 additions & 0 deletions src/jonas-tig/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "jonas/tig",
"id": "jonas-tig",
"version": "1.0.0",
"description": "Install \"tig\" binary",
"documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/jonas-tig",
"options": {
"version": {
"type": "string",
"default": "latest",
"proposals": [
"latest"
],
"description": "Currently unused. tig is installed via the system package manager."
}
}
}
35 changes: 35 additions & 0 deletions src/jonas-tig/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
set -o errexit
set -o pipefail
set -o noclobber
set -o nounset
set -o allexport
readonly name="tig"
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 tig
apt_get_cleanup
}
echo_banner "devcontainer.community"
echo "Installing $name..."
install "$@"
echo "(*) Done!"
18 changes: 18 additions & 0 deletions test/jonas-tig/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/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 <LABEL> <cmd> [args...]
check "execute command" bash -c "tig --version | grep 'tig version'"

# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
Loading