-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbump
More file actions
executable file
·33 lines (27 loc) · 1.01 KB
/
bump
File metadata and controls
executable file
·33 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# arguments:
# -none- syncdb + migrate + reqs + lessc
# first -as above- + db dir + admin user + git submodules
# lessc lessc
root_dir=`grep -oEi "version=([a-z]+)" setup.py |cut -d= -f2`
if [ "$1" = "first" ] || [ "$1" = "firstrun" ]; then
mkdir -p ./.devtmp/media ./.devtmp/static
python manage.py syncdb --noinput
python manage.py migrate
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'admin')" | python manage.py shell
git submodule update --init
fi
if [ ! $1 ]; then
pip install -r ./requirements-dev.txt --extra-index-url http://pypi.smdev.cz/simple/
python manage.py syncdb --noinput
python manage.py migrate
fi
# all the time
if which lessc > /dev/null; then
echo "compiling .less"
lessc --verbose ${root_dir}/project_static/less/master.less > ${root_dir}/project_static/css/master.css
fi
if which coffee > /dev/null; then
echo "compiling .coffee"
coffee -b -o ${root_dir}/project_static/js/ -c ${root_dir}/project_static/coffee/
fi