|
| 1 | +#!/bin/zsh |
| 2 | + |
| 3 | +# Install dependencies |
| 4 | +poetry install |
| 5 | + |
| 6 | +# Auto set up remote when pushing new branches |
| 7 | +git config --global --add push.autoSetupRemote 1 |
| 8 | + |
| 9 | +# Allow precommit to install properly |
| 10 | +git config --global --add safe.directory /workspace |
| 11 | + |
| 12 | +# Install precommit hooks |
| 13 | +pre-commit install && pre-commit install -t commit-msg |
| 14 | + |
| 15 | +# Set zsh history location |
| 16 | +# This is done in postAttach so it's not overridden by the oh-my-zsh devcontainer feature |
| 17 | +# |
| 18 | +# We leave you to decide, but if you put this into a folder that's been mapped |
| 19 | +# into the container, then history will persist over container rebuilds :) |
| 20 | +# |
| 21 | +# !!!IMPORTANT!!! |
| 22 | +# Make sure your .zsh_history file is NOT committed into your repository or docker builds, |
| 23 | +# as it can contain sensitive information. So in this case, you should add |
| 24 | +# .devcontainer/.zsh_history |
| 25 | +# to your .gitignore and .dockerignore files. |
| 26 | +export HISTFILE="/workspace/.devcontainer/.zsh_history" |
| 27 | + |
| 28 | +# Add aliases to zshrc file |
| 29 | +echo '# Aliases to avoid typing "python manage.py" repeatedly' >> ~/.zshrc |
| 30 | +echo 'alias dj="python manage.py"' >> ~/.zshrc |
| 31 | +echo 'alias djmm="python manage.py makemigrations"' >> ~/.zshrc |
| 32 | +echo 'alias djm="python manage.py migrate"' >> ~/.zshrc |
| 33 | +echo 'alias djr="python manage.py runserver"' >> ~/.zshrc |
| 34 | +echo 'alias djreset="python manage.py reset_db -c"' >> ~/.zshrc |
| 35 | +echo 'alias djs="python manage.py shell_plus"' >> ~/.zshrc |
| 36 | +echo 'alias dju="python manage.py show_urls"' >> ~/.zshrc |
0 commit comments