perf: codespaces

This commit is contained in:
2025-12-23 22:22:20 +02:00
parent 7b5e4e12d2
commit ab936390dd
13 changed files with 37 additions and 1 deletions

View File

@@ -5,7 +5,7 @@
# Print SSH key. # Print SSH key.
# #
# Skip in Codespaces # Skip in Codespaces (managed by GitHub)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; } [[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
# Skip if explicitly disabled # Skip if explicitly disabled

View File

@@ -5,6 +5,9 @@
# (distros with apt only) Install core apt packages. # (distros with apt only) Install core apt packages.
# #
# Skip in Codespaces (pre-installed in universal image)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
# apt only # apt only
[[ "$DOTS_PKG" != "apt" ]] && { log_warn "Skipping: Not using apt"; return 0; } [[ "$DOTS_PKG" != "apt" ]] && { log_warn "Skipping: Not using apt"; return 0; }

View File

@@ -5,6 +5,9 @@
# Configure git. # Configure git.
# #
# Skip in Codespaces (pre-installed in universal image)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; git --version; return 0; }
if ! command -v git &> /dev/null; then if ! command -v git &> /dev/null; then
case "$DOTS_PKG" in case "$DOTS_PKG" in
apt) apt)

View File

@@ -5,6 +5,9 @@
# Configure pyenv. # Configure pyenv.
# #
# Skip in Codespaces (use pre-installed Python)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
export PYENV_ROOT="$HOME/.pyenv" export PYENV_ROOT="$HOME/.pyenv"
if ! echo "$PATH" | grep -q "$PYENV_ROOT"; then if ! echo "$PATH" | grep -q "$PYENV_ROOT"; then
export PATH="$PYENV_ROOT/bin:$PATH" export PATH="$PYENV_ROOT/bin:$PATH"

View File

@@ -5,6 +5,9 @@
# Configure Python. # Configure Python.
# #
# Skip in Codespaces (use pre-installed Python)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
local version="3.14.2" local version="3.14.2"

View File

@@ -5,6 +5,9 @@
# Configure Node.js. # Configure Node.js.
# #
# Skip in Codespaces (use pre-installed Node.js)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
NVM_DIR=${NVM_DIR:-"$HOME/.nvm"} NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"

View File

@@ -5,6 +5,9 @@
# Install Azure CLI. # Install Azure CLI.
# #
# Skip in Codespaces (project-specific tool)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
if ! command -v az &>/dev/null; then if ! command -v az &>/dev/null; then
case "$DOTS_PKG" in case "$DOTS_PKG" in
apt) apt)

View File

@@ -5,6 +5,9 @@
# Install GitHub CLI. # Install GitHub CLI.
# #
# Skip in Codespaces (pre-installed in universal image)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
if ! command -v gh &>/dev/null; then if ! command -v gh &>/dev/null; then
case "$DOTS_PKG" in case "$DOTS_PKG" in
apt) apt)

View File

@@ -5,6 +5,9 @@
# Install terraform. # Install terraform.
# #
# Skip in Codespaces (project-specific tool)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
if ! command -v terraform &>/dev/null; then if ! command -v terraform &>/dev/null; then
case "$DOTS_PKG" in case "$DOTS_PKG" in
apt) apt)

View File

@@ -5,6 +5,9 @@
# Install Redis. # Install Redis.
# #
# Skip in Codespaces (project-specific tool)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
if ! command -v redis-cli &>/dev/null; then if ! command -v redis-cli &>/dev/null; then
case "$DOTS_PKG" in case "$DOTS_PKG" in
apt) apt)

View File

@@ -5,6 +5,9 @@
# Install neofetch. # Install neofetch.
# #
# Skip in Codespaces (cosmetic tool)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
if ! command -v neofetch &>/dev/null; then if ! command -v neofetch &>/dev/null; then
case "$DOTS_PKG" in case "$DOTS_PKG" in
apt) apt)

View File

@@ -5,6 +5,9 @@
# Clean up after installation. # Clean up after installation.
# #
# Skip in Codespaces (minimal benefit in ephemeral environment)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
case "$DOTS_PKG" in case "$DOTS_PKG" in
brew) brew)
brew cleanup brew cleanup

View File

@@ -5,4 +5,7 @@
# Print system information. # Print system information.
# #
# Skip in Codespaces (cosmetic only)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
neofetch neofetch