Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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