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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. VERSION=$(shell semver)
  2. TODAY=$(shell date +%F)
  3. # You want latexmk to *always* run, because make does not have all the info.
  4. # Also, include non-file targets in .PHONY so they are run regardless of any
  5. # file of the given name existing.
  6. .PHONY: production setup commit
  7. # The first rule in a Makefile is the one executed by default ("make"). It
  8. # should always be the "all" rule, so that "make" and "make all" are identical.
  9. all: preprocess
  10. ##
  11. # Deploy to production
  12. production:
  13. git push origin master
  14. bundle exec cap production deploy
  15. ##
  16. # Preprocess the template using ERB templating.
  17. preprocess: index.html.erb
  18. bundle exec erb version=$(VERSION) date=$(TODAY) index.html.erb > index.html
  19. commit: index.html
  20. git commit index.html -m"build $(VERSION)"
  21. bump-minor:
  22. semver inc minor
  23. git commit .semver -m"bump version"
  24. bump-patch:
  25. semver inc patch
  26. git commit .semver -m"bump version"
  27. clean:
  28. rm -f "index.html"
  29. ##
  30. # Set up the project for building
  31. setup: ruby packages
  32. ruby:
  33. bundle install
  34. packages:
  35. apt-get install git-flow