2013-05-26 19:01:00 +04:00
release = ansibleworks-1.2b1
2013-03-13 21:09:36 +04:00
clean :
2013-05-25 01:55:03 +04:00
rm -rf build *.egg-info
2013-03-13 21:09:36 +04:00
find . -type f -regex " .*\.py[co] $$ " -delete
2013-03-13 23:28:30 +04:00
rebase :
git pull --rebase origin master
2013-03-14 00:06:19 +04:00
push :
git push
2013-03-13 23:15:35 +04:00
zero :
2013-03-14 00:06:19 +04:00
# go back to original database state, be careful!
2013-03-13 23:21:06 +04:00
python manage.py migrate main zero
2013-03-13 23:15:35 +04:00
2013-03-01 04:52:14 +04:00
setup :
2013-03-14 00:06:19 +04:00
# use ansible to ansible ansible commander locally
2013-03-13 23:15:35 +04:00
ansible-playbook app_setup/setup.yml --verbose -i "127.0.0.1," -c local -e working_dir = ` pwd `
2013-03-01 04:52:14 +04:00
2013-05-25 01:55:03 +04:00
develop :
# "Install" ansibleworks package in development mode. Creates link to
# working copy in site-packages,
2013-05-22 01:39:34 +04:00
python setup.py develop
2013-05-25 01:55:03 +04:00
refresh : clean develop syncdb migrate
# update/refresh development environment after pulling new code
2013-05-22 01:39:34 +04:00
2013-03-14 01:20:50 +04:00
adduser :
python manage.py createsuperuser
2013-03-01 04:52:14 +04:00
syncdb :
2013-03-13 23:15:35 +04:00
# only run from initial setup
2013-05-25 01:55:03 +04:00
python manage.py syncdb --noinput
2013-03-01 04:52:14 +04:00
runserver :
2013-03-13 23:15:35 +04:00
# run for testing the server
2013-03-13 23:21:06 +04:00
python manage.py runserver
2013-03-01 04:52:14 +04:00
2013-03-15 00:11:14 +04:00
celeryd :
# run to start the background celery worker
2013-04-24 00:21:29 +04:00
python manage.py celeryd -l DEBUG -B --autoreload
2013-03-15 00:11:14 +04:00
2013-03-01 04:52:14 +04:00
# already done and should not have to happen again:
#
2013-03-14 00:06:19 +04:00
#south_init:
# python manage.py schemamigration main --initial
2013-03-01 04:52:14 +04:00
dbchange :
2013-03-13 23:15:35 +04:00
# run this each time we make changes to the model
2013-03-14 00:29:51 +04:00
python manage.py schemamigration main changes --auto
2013-03-01 04:52:14 +04:00
2013-05-22 01:39:34 +04:00
migrate : syncdb
2013-05-25 01:55:03 +04:00
# This command fixes migrations following the cleanup for the 1.2b1 release.
2013-05-25 02:12:20 +04:00
-( python manage.py migrate main 2>& 1 | grep 0017_changes) && ( python manage.py migrate main --delete-ghost-migrations --fake 0001_v12b1_initial || python manage.py migrate main --fake)
2013-03-13 23:15:35 +04:00
# run this to apply changes to the model
2013-05-25 01:55:03 +04:00
python manage.py migrate --noinput
2013-03-13 23:15:35 +04:00
dbshell :
# access database shell
# asks for password # PYTHON_PATH=./acom python acom/manage.py dbshell
sudo -u postgres psql -d acom
2013-03-01 04:52:14 +04:00
test :
2013-03-13 23:21:06 +04:00
python manage.py test main
2013-05-22 01:39:34 +04:00
2013-05-22 03:08:46 +04:00
test_coverage :
# Run tests with coverage enabled.
coverage run manage.py test main
coverage_html :
# Output test coverage as HTML (into htmlcov directory).
coverage html
2013-05-22 01:39:34 +04:00
dev_build :
python setup.py dev_build
release_build :
2013-05-23 11:22:16 +04:00
python setup.py release_build
2013-05-25 03:21:47 +04:00
2013-05-26 19:01:00 +04:00
release_ball : clean
2013-05-25 03:21:47 +04:00
make release_build
( cd ../ansible-doc; make)
2013-05-26 19:01:00 +04:00
-( rm -rf $( release) )
mkdir -p $( release) /dist
cp -a dist/* $( release) /dist
mkdir -p $( release) /setup
cp -a setup/* $( release) /setup
mkdir -p $( release) /docs
cp -a ../ansible-doc/*.pdf $( release) /docs
tar -cvf $( release) -all.tar $( release)
clean :
-( rm *.tar)
-( rm -rf ( $release ) )
2013-05-25 03:21:47 +04:00