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 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # These targets are not files
  2. .PHONY: install upgrade sandbox demo test 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. -rm -f sites/demo/db.sqlite
  21. # Create database
  22. sites/demo/manage.py syncdb --noinput
  23. sites/demo/manage.py migrate
  24. # Import some fixtures
  25. sites/demo/manage.py oscar_import_catalogue sites/_fixtures/books-catalogue.csv
  26. sites/demo/manage.py oscar_import_catalogue_images sites/_fixtures/books-images.tar.gz
  27. sites/demo/manage.py loaddata countries.json sites/_fixtures/pages.json sites/_fixtures/auth.json sites/_fixtures/ranges.json
  28. sites/demo/manage.py rebuild_index --noinput
  29. docs:
  30. cd docs && make html
  31. test:
  32. ./runtests.py
  33. ci: upgrade lint
  34. # Run continuous tests and generate lint reports. This is for Hudson which has
  35. # coverage and xunit plugins.
  36. ./runtests.py --with-coverage --with-xunit
  37. coverage xml -i
  38. lint:
  39. ./lint.sh
  40. # It is important that this target only depends on install
  41. # (instead of upgrade) because we install Django in the .travis.yml
  42. # and upgrade would overwrite it. We also build the sandbox as part of this target
  43. # to catch any errors that might come from that build process.
  44. travis: install lint test sandbox
  45. messages:
  46. # Create the .po files used for i18n
  47. cd oscar; django-admin.py makemessages -a
  48. gettext:
  49. # Compile the gettext files
  50. cd oscar; django-admin.py compilemessages
  51. puppet:
  52. # Install puppet modules required to set-up a Vagrant box
  53. rm -rf sites/puppet/modules/*
  54. puppet module install --target-dir sites/puppet/modules/ saz-memcached -v 2.0.2
  55. puppet module install --target-dir sites/puppet/modules/ puppetlabs/mysql
  56. puppet module install --target-dir sites/puppet/modules/ puppetlabs/apache
  57. git clone git://github.com/akumria/puppet-postgresql.git sites/puppet/modules/postgresql
  58. git clone git://github.com/uggedal/puppet-module-python.git sites/puppet/modules/python
  59. git clone git://github.com/codeinthehole/puppet-userconfig.git sites/puppet/modules/userconfig
  60. css:
  61. # Compile CSS files from LESS
  62. lessc oscar/static/oscar/less/styles.less > oscar/static/oscar/css/styles.css
  63. lessc oscar/static/oscar/less/responsive.less > oscar/static/oscar/css/responsive.css
  64. lessc oscar/static/oscar/less/dashboard.less > oscar/static/oscar/css/dashboard.css