2
0

Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Makefile to compile and run tests with phantomjs
  2. #
  3. # "scyt/nodejs" container contains all necessary dependencies to run nodejs with npm, bower and phantomjs browser.
  4. #
  5. # The command below does the following steps:
  6. # - Runs the 10.4.16.33/scytl/nodejs container (-rm = The container is removed once the execution is finished)
  7. # - Mounts the project (current dir) to container's /app/ directory (with write privileges)
  8. # - Sets http_proxy (Otherwise ONE machines cannot fetch depedencies. http_proxy needs to be disabled to non-ONE machines, since the proxy is only visible by ONE)
  9. # - Runs 'make -B compile' _inside_ the container which: (-B is to force rebuild at Makefile)
  10. # - Runs npm install
  11. # - Runs bower install (passes --allow-root, otherwise bower fails with root user)
  12. # - Runs grunt (Which use karma to launch firefox for testing, http_proxy is unset so that firefox can connect to karma for testing)
  13. # By default docker target is executed
  14. all: compile --no-optional
  15. # This is run on the container to build the project
  16. compile:
  17. npm install --unsafe-perm --no-optional
  18. bower install --allow-root
  19. grunt
  20. release_patch:
  21. npm install --unsafe-perm --no-optional
  22. bower install --allow-root
  23. grunt bump:patch
  24. grunt
  25. grunt nexus -v
  26. git add Makefile bower.json package.json
  27. git commit -m "new patch release"
  28. git push master master
  29. release_minor:
  30. npm install --unsafe-perm --no-optional
  31. bower install --allow-root
  32. grunt bump:minor
  33. grunt
  34. grunt nexus
  35. git add Makefile bower.json package.json
  36. git commit -m "new minor release"
  37. git push master master
  38. release_major:
  39. npm install --unsafe-perm --no-optional
  40. bower install --allow-root
  41. grunt bump:major
  42. grunt
  43. grunt nexus
  44. git add Makefile bower.json package.json
  45. git commit -m "new major release"
  46. git push master master