mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
fix(setup): improve conditional checks for optional package installations
This commit is contained in:
parent
5a77734ec5
commit
b461e89f08
2 changed files with 4 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ fi
|
||||||
if [ ! -d "$HOME/.venv" ]; then
|
if [ ! -d "$HOME/.venv" ]; then
|
||||||
echo "==> Creating virtual environment..."
|
echo "==> Creating virtual environment..."
|
||||||
uv venv "$HOME/.venv"
|
uv venv "$HOME/.venv"
|
||||||
|
ln -s "$HOME/.venv/" .venv
|
||||||
fi
|
fi
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
. "$HOME/.venv/bin/activate"
|
. "$HOME/.venv/bin/activate"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
# Install optional pyright for type checking
|
# Install optional pyright for type checking
|
||||||
if command -v npm >/dev/null 2>&1; then
|
if command -v npm >/dev/null 2>&1 && ! command -v pyright >/dev/null 2>&1; then
|
||||||
echo "==> Installing pyright for type checking..."
|
echo "==> Installing pyright for type checking..."
|
||||||
npm install -g pyright 2>/dev/null || {
|
npm install -g pyright 2>/dev/null || {
|
||||||
echo " ⚠️ Warning: pyright installation failed (optional)"
|
echo " ⚠️ Warning: pyright installation failed (optional)"
|
||||||
|
|
@ -16,7 +16,7 @@ if command -v npm >/dev/null 2>&1; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install optional release note backend: GitHub Copilot CLI (AI-powered)
|
# Install optional release note backend: GitHub Copilot CLI (AI-powered)
|
||||||
if command -v npm >/dev/null 2>&1; then
|
if command -v npm >/dev/null 2>&1 && ! command -v copilot >/dev/null 2>&1; then
|
||||||
echo "==> Installing GitHub Copilot CLI for AI-powered release notes..."
|
echo "==> Installing GitHub Copilot CLI for AI-powered release notes..."
|
||||||
npm install -g @github/copilot 2>/dev/null || {
|
npm install -g @github/copilot 2>/dev/null || {
|
||||||
echo " ⚠️ Warning: GitHub Copilot CLI installation failed (optional)"
|
echo " ⚠️ Warning: GitHub Copilot CLI installation failed (optional)"
|
||||||
|
|
@ -25,7 +25,7 @@ if command -v npm >/dev/null 2>&1; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install optional release note backend: git-cliff (template-based)
|
# Install optional release note backend: git-cliff (template-based)
|
||||||
if command -v cargo >/dev/null 2>&1; then
|
if command -v cargo >/dev/null 2>&1 && ! command -v git-cliff >/dev/null 2>&1; then
|
||||||
echo "==> Installing git-cliff for template-based release notes..."
|
echo "==> Installing git-cliff for template-based release notes..."
|
||||||
cargo install git-cliff || {
|
cargo install git-cliff || {
|
||||||
echo " ⚠️ Warning: git-cliff installation failed (optional)"
|
echo " ⚠️ Warning: git-cliff installation failed (optional)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue