Skip to content

Commit 7017b13

Browse files
authored
Merge pull request #65 from octue/hotfix-devcontainer
OPS: Fix missing file from prior release
2 parents b39131b + ac67c5b commit 7017b13

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.devcontainer/postattach.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-gcp"
3-
version = "0.11.3"
3+
version = "0.11.4"
44
description = "Utilities to run Django on Google Cloud Platform"
55
authors = ["Tom Clark"]
66
license = "MIT"

0 commit comments

Comments
 (0)