diff options
Diffstat (limited to 'Makefile.example')
-rw-r--r-- | Makefile.example | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/Makefile.example b/Makefile.example index 1e0545ef7..6351c397d 100644 --- a/Makefile.example +++ b/Makefile.example @@ -8,6 +8,7 @@ project=example_project # list used apps apps="ishtar_common" "archaeological_operations" "archaeological_context_records" "archaeological_files" "archaeological_finds" "archaeological_warehouse" "archaeological_files_pdl" default_data='fr' +version=`head -n 1 version.py | cut -d' ' -f2` help: # Actions available: @@ -51,7 +52,6 @@ coverage: clean archaeological_files_pdl" ./manage.py test $(apps) && coverage report build_gitlab: - cd $(project); $(PYTHON) ./manage.py syncdb --noinput 2> /dev/null > /dev/null cd $(project); $(PYTHON) ./manage.py migrate test_gitlab: clean @@ -66,10 +66,6 @@ pylint: done fresh_syncdb: - cd $(project); $(PYTHON) ./manage.py syncdb --noinput 2> /dev/null > /dev/null - cd $(project); $(PYTHON) ./manage.py migrate ishtar_common 2> /dev/null > /dev/null - if [[ '$(apps)' == *archaeological_files* ]]; then cd $(project); $(PYTHON) ./manage.py migrate archaeological_files 2> /dev/null > /dev/null; fi - $(PYTHON) ./manage.py migrate archaeological_operations 2> /dev/null > /dev/null cd $(project); $(PYTHON) ./manage.py migrate 2> /dev/null > /dev/null echo "* load default data" # data migrations have created some default data - return to a clean state @@ -103,7 +99,6 @@ fresh_syncdb: rm /tmp/site.json syncdb: - cd $(project); $(PYTHON) manage.py syncdb --noinput cd $(project); $(PYTHON) manage.py migrate shell: @@ -128,18 +123,11 @@ compilemessages: collectstatic: cd $(project);$(PYTHON) manage.py collectstatic --noinput -schemamigrations: +migrations: cd $(project);\ for APP in $(apps); do \ - echo "* schemamigration for "$$APP; \ - $(PYTHON) manage.py schemamigration --auto $$APP; \ - done - -schemamigrations_initial: - cd $(project);\ - for APP in $(apps); do \ - echo "* schemamigration for "$$APP; \ - $(PYTHON) manage.py schemamigration --initial $$APP; \ + echo "* makemigrations for "$$APP; \ + $(PYTHON) ./manage.py makemigrations $$APP; \ done generate_doc: @@ -157,12 +145,12 @@ generate_doc: fixtures: fixtures_auth fixtures_common fixtures_operations fixtures_context_records fixtures_finds fixtures_warehouse fixtures_files fixtures_auth: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ auth.permission auth.group \ > '../fixtures/initial_data-auth-'$(default_data)'.json' fixtures_common: fixtures_common_importers fixtures_spatialrefsystem - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ ishtar_common.authortype \ ishtar_common.persontype \ ishtar_common.organizationtype \ @@ -270,3 +258,8 @@ distribute_main: sdist deb: clean debuild -i -us -uc -b + +push_install: clean + tar cvjf install-ishtar-$(version).tar.bz2 install/ + scp install-ishtar-$(version).tar.bz2 root@git:/var/www/ishtar/install/ + rm install-ishtar-$(version).tar.bz2 |