Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Makefile 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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
  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. Order is important as JSON fixtures include primary keys
  15. sites/sandbox/manage.py loaddata sites/sandbox/fixtures/variants.json
  16. sites/sandbox/manage.py oscar_import_catalogue sites/sandbox/fixtures/*.csv
  17. sites/sandbox/manage.py oscar_import_catalogue_images sites/sandbox/fixtures/images.tar.gz
  18. sites/sandbox/manage.py loaddata countries.json sites/_fixtures/pages.json sites/_fixtures/auth.json sites/_fixtures/ranges.json sites/_fixtures/offers.json
  19. sites/sandbox/manage.py clear_index --noinput
  20. sites/sandbox/manage.py update_index catalogue
  21. geoip:
  22. wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
  23. gunzip GeoLiteCity.dat.gz
  24. mv GeoLiteCity.dat sites/demo/geoip
  25. demo: install
  26. # Install additional requirements
  27. pip install -r requirements_demo.txt
  28. # Create database
  29. sites/demo/manage.py reset_db --router=default --noinput
  30. sites/demo/manage.py syncdb --noinput
  31. sites/demo/manage.py migrate
  32. # Import some core fixtures
  33. sites/demo/manage.py loaddata countries.json sites/_fixtures/pages.json
  34. # Create catalogue (create product classes from fixture than import CSV files)
  35. sites/demo/manage.py loaddata sites/demo/fixtures/auth.json sites/demo/fixtures/offers.json
  36. sites/demo/manage.py loaddata sites/demo/fixtures/product-classes.json sites/demo/fixtures/product-attributes.json sites/demo/fixtures/shipping-event-types.json
  37. sites/demo/manage.py create_products --class=Books sites/demo/fixtures/books.csv
  38. sites/demo/manage.py create_products --class=Downloads sites/demo/fixtures/downloads.csv
  39. sites/demo/manage.py create_products --class=Clothing sites/demo/fixtures/clothing.csv
  40. sites/demo/manage.py import_product_images sites/demo/fixtures/images/
  41. # Update search index
  42. sites/demo/manage.py clear_index --noinput
  43. sites/demo/manage.py update_index catalogue
  44. docs:
  45. cd docs && make html
  46. coverage:
  47. coverage run ./runtests.py --with-xunit
  48. coverage xml -i
  49. # We probably should use upgrade instead of install here but we have a conflict
  50. # around django versions which conflicts with tox. Use install for now until
  51. # upgrade can run without conflict.
  52. ci: install lint coverage
  53. lint:
  54. ./lint.sh
  55. # It is important that this target only depends on install
  56. # (instead of upgrade) because we install Django in the .travis.yml
  57. # and upgrade would overwrite it. We also build the sandbox as part of this target
  58. # to catch any errors that might come from that build process.
  59. travis: install lint coverage sandbox
  60. pip install -r requirements_vagrant.txt
  61. cd sites/sandbox && ./test_migrations.sh
  62. messages:
  63. # Create the .po files used for i18n
  64. cd oscar; django-admin.py makemessages -a
  65. compiledmessages:
  66. # Compile the gettext files
  67. cd oscar; django-admin.py compilemessages
  68. puppet:
  69. # Install puppet modules required to set-up a Vagrant box
  70. mkdir -p sites/puppet/modules
  71. rm -rf sites/puppet/modules/*
  72. puppet module install --target-dir sites/puppet/modules/ saz-memcached -v 2.0.2
  73. puppet module install --target-dir sites/puppet/modules/ puppetlabs/mysql
  74. puppet module install --target-dir sites/puppet/modules/ puppetlabs/apache
  75. puppet module install --target-dir sites/puppet/modules/ dhutty/nginx
  76. git clone git://github.com/akumria/puppet-postgresql.git sites/puppet/modules/postgresql
  77. git clone git://github.com/puppetmodules/puppet-module-python.git sites/puppet/modules/python
  78. git clone git://github.com/codeinthehole/puppet-userconfig.git sites/puppet/modules/userconfig
  79. css:
  80. # Compile CSS files from LESS
  81. lessc oscar/static/oscar/less/styles.less > oscar/static/oscar/css/styles.css
  82. lessc oscar/static/oscar/less/responsive.less > oscar/static/oscar/css/responsive.css
  83. lessc oscar/static/oscar/less/dashboard.less > oscar/static/oscar/css/dashboard.css
  84. demo_css:
  85. # Compile CSS for demo site
  86. lessc sites/demo/static/demo/less/styles.less > sites/demo/static/demo/css/styles.css
  87. lessc sites/demo/static/demo/less/responsive.less > sites/demo/static/demo/css/responsive.css
  88. clean:
  89. # Remove files not in source control
  90. find . -type f -name "*.pyc" -delete
  91. rm -rf nosetests.xml coverage.xml htmlcov *.egg-info *.pdf dist violations.txt