shell improvements

This commit is contained in:
John Lancaster
2024-09-16 17:20:52 +00:00
parent a84651f742
commit 8954a4f8f8

View File

@@ -10,15 +10,19 @@ pkgs.mkShell {
shellHook = '' shellHook = ''
echo "Welcome to the Nix shell for AppDaemon development" echo "Welcome to the Nix shell for AppDaemon development"
cd /usr/src/app
echo "URL: $(git config --get remote.origin.url)"
echo "Branch: $(git rev-parse --abbrev-ref HEAD)"
echo "Hash: $(git rev-parse --short HEAD)"
alias build="uv run python -m build" alias build="uv run python -m build"
alias dbuild="docker build -t acockburn/appdaemon:local-dev /usr/src/app" alias dbuild="docker build -t acockburn/appdaemon:local-dev /usr/src/app"
alias fbuild="build && dbuild" alias fbuild="build && dbuild"
alias clean="cd /usr/src/app && rm -rf ./build ./dist" alias clean="cd /usr/src/app && rm -rf ./build ./dist"
alias ad="python -m appdaemon" alias ad="python -m appdaemon"
cd /usr/src/app
uv sync --all-extras --upgrade --inexact uv sync --all-extras --upgrade --inexact
source .venv/bin/activate source .venv/bin/activate
echo -e "Built and activated virtual environment\n"
''; '';
} }