Microservice to handle the Contact form on placebazaar.org
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 910B

12345678910111213141516171819202122232425262728293031323334353637
  1. CMD_PREFIX=bundle exec
  2. # You want latexmk to *always* run, because make does not have all the info.
  3. # Also, include non-file targets in .PHONY so they are run regardless of any
  4. # file of the given name existing.
  5. .PHONY: all test lint clean setup ruby run packages preprocess deploy_production
  6. # The first rule in a Makefile is the one executed by default ("make"). It
  7. # should always be the "all" rule, so that "make" and "make all" are identical.
  8. all: test lint
  9. # CUSTOM BUILD RULES
  10. test:
  11. $(CMD_PREFIX) ruby -I lib:test:. -e "Dir.glob('**/*_test.rb') { |f| require(f) }"
  12. lint:
  13. $(CMD_PREFIX) rubocop
  14. clean:
  15. $(CMD_PREFIX) rake db:drop
  16. $(CMD_PREFIX) rake db:create
  17. $(CMD_PREFIX) rake db:migrate
  18. run:
  19. $(CMD_PREFIX) foreman start
  20. deploy_production:
  21. $(CMD_PREFIX) cap production deploy
  22. ##
  23. # Set up the project for building
  24. setup: ruby packages
  25. ruby:
  26. bundle install
  27. packages:
  28. sudo apt install ruby