You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # These targets are not files
  2. .PHONY: install upgrade sandbox demo coverage ci i18n lint travis docs
  3. install:
  4. pip install -r requirements.txt --use-mirrors
  5. python setup.py develop
  6. upgrade:
  7. pip install --upgrade -r requirements.txt --use-mirrors
  8. python setup.py develop --upgrade
  9. sandbox: install
  10. -rm -f sites/sandbox/db.sqlite
  11. # Create database
  12. sites/sandbox/manage.py syncdb --noinput
  13. sites/sandbox/manage.py migrate
  14. # Import some fixtures
  15. sites/sandbox/manage.py oscar_import_catalogue sites/_fixtures/books-catalogue.csv
  16. sites/sandbox/manage.py oscar_import_catalogue_images sites/_fixtures/books-images.tar.gz
  17. sites/sandbox/manage.py loaddata countries.json sites/_fixtures/pages.json sites/_fixtures/auth.json sites/_fixtures/ranges.json sites/_fixtures/offers.json
  18. sites/sandbox/manage.py rebuild_index --noinput
  19. demo: install
  20. pip install -r requirements_demo.txt --use-mirrors
  21. -rm -f sites/demo/db.sqlite
  22. # Create database
  23. sites/demo/manage.py syncdb --noinput
  24. sites/demo/manage.py migrate
  25. # Import some fixtures
  26. sites/demo/manage.py oscar_import_catalogue sites/_fixtures/books-catalogue.csv
  27. sites/demo/manage.py oscar_import_catalogue_images sites/_fixtures/books-images.tar.gz
  28. sites/demo/manage.py loaddata countries.json sites/_fixtures/pages.json sites/_fixtures/auth.json sites/_fixtures/ranges.json
  29. sites/demo/manage.py rebuild_index --noinput
  30. docs:
  31. cd docs && make html
  32. coverage:
  33. coverage run ./runtests.py
  34. coverage xml -i
  35. # We probably should use upgrade instead of install here but we have a conflict
  36. # around django versions which conflicts with tox. Use install for now until
  37. # upgrade can run without conflict.
  38. ci: install lint coverage
  39. lint:
  40. ./lint.sh
  41. # It is important that this target only depends on install
  42. # (instead of upgrade) because we install Django in the .travis.yml
  43. # and upgrade would overwrite it. We also build the sandbox as part of this target
  44. # to catch any errors that might come from that build process.
  45. travis: install lint coverage sandbox
  46. messages:
  47. # Create the .po files used for i18n
  48. cd oscar; django-admin.py makemessages -a
  49. compiledmessages:
  50. # Compile the gettext files
  51. cd oscar; django-admin.py compilemessages
  52. puppet:
  53. # Install puppet modules required to set-up a Vagrant box
  54. rm -rf sites/puppet/modules/*
  55. puppet module install --target-dir sites/puppet/modules/ saz-memcached -v 2.0.2
  56. puppet module install --target-dir sites/puppet/modules/ puppetlabs/mysql
  57. puppet module install --target-dir sites/puppet/modules/ puppetlabs/apache
  58. git clone git://github.com/akumria/puppet-postgresql.git sites/puppet/modules/postgresql
  59. git clone git://github.com/uggedal/puppet-module-python.git sites/puppet/modules/python
  60. git clone git://github.com/codeinthehole/puppet-userconfig.git sites/puppet/modules/userconfig
  61. css:
  62. # Compile CSS files from LESS
  63. lessc oscar/static/oscar/less/styles.less > oscar/static/oscar/css/styles.css
  64. lessc oscar/static/oscar/less/responsive.less > oscar/static/oscar/css/responsive.css
  65. lessc oscar/static/oscar/less/dashboard.less > oscar/static/oscar/css/dashboard.css