diff --git a/README.md b/README.md index 26a937a..0e32750 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ | [starship.rs](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/starship.rs) | `starship` — minimal, fast cross-shell prompt | gh release | 1.0.1 | | [swc.rs](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/swc.rs) | `swc` — ultra-fast JS/TS compiler | gh release | 1.0.0 | | [tailscale.com](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/tailscale.com) | `tailscale` — zero-config mesh VPN | curl | 1.0.0 | +| [taskwarrior.org](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/taskwarrior.org) | `task` — command-line task manager | apt | 1.0.0 | | [webinstall.dev](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/webinstall.dev) | `webi` — install packages without sudo | curl | 1.0.1 | | [yakitrak/notesmd-cli](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/yakitrak-notesmd-cli) | `notesmd-cli` — manage Obsidian vaults from the terminal | gh release | 1.0.0 | | [yq](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/yq) | `yq` — command-line YAML/JSON/XML processor | gh release | 1.0.0 | diff --git a/src/taskwarrior.org/NOTES.md b/src/taskwarrior.org/NOTES.md new file mode 100644 index 0000000..90726c9 --- /dev/null +++ b/src/taskwarrior.org/NOTES.md @@ -0,0 +1,17 @@ +# taskwarrior.org + +## Project + +- [taskwarrior](https://taskwarrior.org) + +## Description + +Command-line task management tool with filtering and reporting capabilities. + +## Installation Method + +Installed via the system APT package manager (`apt-get install taskwarrior`). + +## Other Notes + +_No additional notes._ diff --git a/src/taskwarrior.org/devcontainer-feature.json b/src/taskwarrior.org/devcontainer-feature.json new file mode 100644 index 0000000..2b31021 --- /dev/null +++ b/src/taskwarrior.org/devcontainer-feature.json @@ -0,0 +1,17 @@ +{ + "name": "taskwarrior.org", + "id": "taskwarrior.org", + "version": "1.0.0", + "description": "Install \"task\" binary", + "documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/taskwarrior.org", + "options": { + "version": { + "type": "string", + "default": "latest", + "proposals": [ + "latest" + ], + "description": "Currently unused. taskwarrior is installed via the system package manager." + } + } +} diff --git a/src/taskwarrior.org/install.sh b/src/taskwarrior.org/install.sh new file mode 100755 index 0000000..9e2d53d --- /dev/null +++ b/src/taskwarrior.org/install.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -o errexit +set -o pipefail +set -o noclobber +set -o nounset +set -o allexport +readonly name="taskwarrior" +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 taskwarrior + apt_get_cleanup +} +echo_banner "devcontainer.community" +echo "Installing $name..." +install "$@" +echo "(*) Done!" diff --git a/test/taskwarrior.org/test.sh b/test/taskwarrior.org/test.sh new file mode 100755 index 0000000..bdf3fcd --- /dev/null +++ b/test/taskwarrior.org/test.sh @@ -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