Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This script will configure the baseline repo for development and deployment.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
set +e | ||
|
||
# make sure we're in the project directory | ||
SCRIPT_DIR=$(dirname $0) | ||
cd "${SCRIPT_DIR}" | ||
|
||
# move origin over to baseline | ||
git remote -v | grep -q '^baseline' || git remote rename origin baseline; | ||
|
||
if [ ! -e venv ]; then | ||
virtualenv venv --distribute | ||
venv/bin/pip install -r requirements.txt | ||
fi; | ||
|
||
# create the virtual environment and install requirements | ||
secret_key=baseline/secretkey.py | ||
if [ ! -e ${secret_key} ]; then | ||
venv/bin/python manage.py secretkey; | ||
|
||
git add ${secret_key} | ||
git commit -m"Added ${secret_key}" ${secret_key} | ||
fi; | ||
|
||
# create localsettings module | ||
if [ ! -e baseline/localsettings.py ]; then | ||
echo "DEBUG = True" >> baseline/localsettings.py | ||
fi; | ||
|
||
# sync the local database | ||
python manage.py syncdb | ||
python manage.py migrate |