deploy.sh: source .env, add dagger to PATH from nix store

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-05-23 11:18:44 +02:00
co-authored by Claude Sonnet 4.6
parent eecef1a4a8
commit 8d49a6b267
+11 -5
View File
@@ -2,10 +2,16 @@
set -euo pipefail
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
# Add task from nix store if not already in PATH
if ! command -v task &>/dev/null; then
TASK_BIN=$(ls -d /nix/store/*go-task-*/bin/task 2>/dev/null | sort -V | tail -1)
[ -n "$TASK_BIN" ] && export PATH="$(dirname "$TASK_BIN"):$PATH"
fi
# Load .env into environment
set -a
# shellcheck source=.env
source "$REPO_DIR/.env"
set +a
# Add task and dagger from nix store if not already in PATH
for pkg in "*go-task-*/bin/task" "*dagger-*/bin/dagger"; do
bin=$(ls -d /nix/store/$pkg 2>/dev/null | sort -V | tail -1)
[ -n "$bin" ] && export PATH="$(dirname "$bin"):$PATH"
done
exec python3 "$REPO_DIR/deploy_cron.py"